From c6052a5fbb80514c8cbd04bdac1a6743e63ae6e6 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 13 Nov 2021 17:24:31 +0100 Subject: [PATCH] fix PHP 8.0 TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given --- api/src/Mail/Imap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/Mail/Imap.php b/api/src/Mail/Imap.php index ab71769fcf..ce91a289fc 100644 --- a/api/src/Mail/Imap.php +++ b/api/src/Mail/Imap.php @@ -687,7 +687,7 @@ class Imap extends Horde_Imap_Client_Socket implements Imap\PushIface 'MAILBOX' => $k, 'ATTRIBUTES' => $box['attributes'], 'delimiter' => $box['delimiter'] ? $box['delimiter'] : $this->getDelimiter('personal'), - 'SUBSCRIBED' => in_array(self::SUBSCRIBED_ATTRIBUTE, $box['attributes']), + 'SUBSCRIBED' => in_array(self::SUBSCRIBED_ATTRIBUTE, $box['attributes'] ?? []), ]; } }