From 2f6f682cd88bbcf3aac39ff5011d9c3f2304e9d0 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 18 Nov 2021 09:01:36 +0100 Subject: [PATCH] fix PHP 8.0 TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given --- mail/inc/class.mail_zpush.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mail/inc/class.mail_zpush.inc.php b/mail/inc/class.mail_zpush.inc.php index 044b9f1a37..1832a64c36 100644 --- a/mail/inc/class.mail_zpush.inc.php +++ b/mail/inc/class.mail_zpush.inc.php @@ -1633,7 +1633,7 @@ class mail_zpush implements activesync_plugin_write, activesync_plugin_sendmail, //ZLog::Write(LOGLEVEL_DEBUG,__METHOD__.__LINE__.array2string($rv_messages)); $list=array(); - $cnt = count($rv_messages['header']); + $cnt = count($rv_messages['header'] ?? []); //$list['status'] = 1; $list['searchtotal'] = $cnt; $list["range"] = $_searchquery->GetSearchRange();