Skip to content

Commit 01328a1

Browse files
committedMay 23, 2022
Prevent TypeError while constructing ConnectionException.
Now handles \imap_errors() returning false. Addresses/avoids #671
1 parent 13bdfa9 commit 01328a1

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)