Skip to content

Commit

Permalink
Fixed TypeError
Browse files Browse the repository at this point in the history
  • Loading branch information
kukulich committed Mar 24, 2021
1 parent f1ff5ca commit f56a7f8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Jyxo/Mail/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -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], '');
Expand Down

0 comments on commit f56a7f8

Please sign in to comment.