From fec1c6593bff2b0eed1c5328d064bab154077d6f Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 19 Nov 2021 10:48:56 +0100 Subject: [PATCH] fix PHP 8.0 TypeError: array_search(): Argument #2 ($haystack) must be of type array, null given --- addressbook/inc/class.addressbook_zpush.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addressbook/inc/class.addressbook_zpush.inc.php b/addressbook/inc/class.addressbook_zpush.inc.php index 307133cb91..879e074d1e 100644 --- a/addressbook/inc/class.addressbook_zpush.inc.php +++ b/addressbook/inc/class.addressbook_zpush.inc.php @@ -557,7 +557,7 @@ class addressbook_zpush implements activesync_plugin_write, activesync_plugin_se case 'cat_id': // for existing entries in all-in-one addressbook, remove addressbook name as category - if ($contact && $GLOBALS['egw_info']['user']['preferences']['activesync']['addressbook-all-in-one'] && + if ($contact && $GLOBALS['egw_info']['user']['preferences']['activesync']['addressbook-all-in-one'] && is_array($message->$key) && ($k=array_search($this->get_addressbooks($contact['owner'].($contact['private']?'p':''), false, true),$message->$key))) { unset($message->categories[$k]);