fix PHP 8.0 TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given

This commit is contained in:
Ralf Becker 2021-11-13 17:24:31 +01:00
parent 8063b9a8ef
commit 587a9c0a88

View File

@ -687,7 +687,7 @@ class Imap extends Horde_Imap_Client_Socket implements Imap\PushIface
'MAILBOX' => $k, 'MAILBOX' => $k,
'ATTRIBUTES' => $box['attributes'], 'ATTRIBUTES' => $box['attributes'],
'delimiter' => $box['delimiter'] ? $box['delimiter'] : $this->getDelimiter('personal'), 'delimiter' => $box['delimiter'] ? $box['delimiter'] : $this->getDelimiter('personal'),
'SUBSCRIBED' => in_array(self::SUBSCRIBED_ATTRIBUTE, $box['attributes']), 'SUBSCRIBED' => in_array(self::SUBSCRIBED_ATTRIBUTE, $box['attributes'] ?? []),
]; ];
} }
} }