mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 01:13:25 +01:00
fix PHP 8.0 TypeError: array_search(): Argument #2 ($haystack) must be of type array, null given
This commit is contained in:
parent
4f78f557bb
commit
fec1c6593b
@ -557,7 +557,7 @@ class addressbook_zpush implements activesync_plugin_write, activesync_plugin_se
|
|||||||
|
|
||||||
case 'cat_id':
|
case 'cat_id':
|
||||||
// for existing entries in all-in-one addressbook, remove addressbook name as category
|
// 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)))
|
($k=array_search($this->get_addressbooks($contact['owner'].($contact['private']?'p':''), false, true),$message->$key)))
|
||||||
{
|
{
|
||||||
unset($message->categories[$k]);
|
unset($message->categories[$k]);
|
||||||
|
Loading…
Reference in New Issue
Block a user