From f56a7f8615104761aec690756c5f2cc04cb62bbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20Hansl=C3=ADk?= Date: Wed, 24 Mar 2021 14:37:40 +0100 Subject: [PATCH] Fixed TypeError --- Jyxo/Mail/Parser.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Jyxo/Mail/Parser.php b/Jyxo/Mail/Parser.php index b5c3a8f..9eaba44 100644 --- a/Jyxo/Mail/Parser.php +++ b/Jyxo/Mail/Parser.php @@ -210,6 +210,10 @@ public function getHeaders(?string $pid = null): array $headerInfo = imap_rfc822_parse_headers($rawHeaders); } + if ($headerInfo === false) { + return []; + } + // Adds a header that the IMAP extension does not support if (preg_match("~Disposition-Notification-To:(.+?)(?=\r?\n(?:\\S|\r?\n))~is", $rawHeaders, $matches)) { $addressList = imap_rfc822_parse_adrlist($matches[1], '');