Skip to content

Commit

Permalink
Prevent TypeError while constructing ConnectionException.
Browse files Browse the repository at this point in the history
Now handles \imap_errors() returning false.
Addresses/avoids #671
  • Loading branch information
Andrew-Staves-Activ committed May 23, 2022
1 parent 13bdfa9 commit 01328a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PhpImap/Imap.php
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ public static function open(
$result = @\imap_open($mailbox, $username, $password, $options, $n_retries, $params);

if (!$result) {
throw new ConnectionException(\imap_errors());
throw new ConnectionException(\imap_errors() ?: []);
}

return $result;
Expand Down

0 comments on commit 01328a1

Please sign in to comment.