Skip to content

Commit 94107fd

Browse files
authored
Merge pull request #674 from Andrew-Staves-Activ/master
Prevent TypeError while constructing ConnectionException.
2 parents 9857a1d + 01328a1 commit 94107fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PhpImap/Imap.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ public static function open(
709709
$result = @\imap_open($mailbox, $username, $password, $options, $n_retries, $params);
710710

711711
if (!$result) {
712-
throw new ConnectionException(\imap_errors());
712+
throw new ConnectionException(\imap_errors() ?: []);
713713
}
714714

715715
return $result;

0 commit comments

Comments
 (0)