Skip to content

Commit

Permalink
Merge pull request #674 from Andrew-Staves-Activ/master
Browse files Browse the repository at this point in the history
Prevent TypeError while constructing ConnectionException.
  • Loading branch information
Sebbo94BY committed Dec 5, 2022
2 parents 9857a1d + 01328a1 commit 94107fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PhpImap/Imap.php
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 94107fd

Please sign in to comment.