From 94ae9e2d0d8d13ac52de96bb07899e1151826dfa Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 5 Nov 2021 15:12:40 +0100 Subject: [PATCH] fix PHP 8.0 TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given --- mail/inc/class.mail_ui.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index b039389b42..08dda2556f 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -2291,8 +2291,8 @@ $filter['before']= date("d-M-Y", $cutoffdate2); $content['mailDisplayBodySrc'] = Egw::link('/index.php',$linkData); $content['mail_displayattachments'] = $attachmentHTMLBlock; $content['mail_id']=$rowID; - $content['mailDisplayContainerClass']=(count($attachments)?"mailDisplayContainer mailDisplayContainerFixedHeight":"mailDisplayContainer mailDisplayContainerFullHeight"); - $content['mailDisplayAttachmentsClass']=(count($attachments)?"mailDisplayAttachments":"mail_DisplayNone"); + $content['mailDisplayContainerClass']=!empty($attachments)?"mailDisplayContainer mailDisplayContainerFixedHeight":"mailDisplayContainer mailDisplayContainerFullHeight"; + $content['mailDisplayAttachmentsClass']=!empty($attachments)?"mailDisplayAttachments":"mail_DisplayNone"; // DRAG attachments actions $etpl->setElementAttribute('mail_displayattachments', 'actions', array(