Skip to content

Commit 051bbde

Browse files
authored
I guess this could fix the issues #19
1 parent 7af28d2 commit 051bbde

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/IMAP/Client.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,8 @@ public function connect($attempts = 3)
186186
config('imap.options.open')
187187
);
188188
} catch (\ErrorException $e) {
189-
$message = $e->getMessage().'. '.implode("; ", imap_errors());
189+
$errors = imap_errors();
190+
$message = $e->getMessage().'. '.implode("; ", (is_array($errors) ? $errors : array()));
190191

191192
throw new ConnectionFailedException($message);
192193
}
@@ -426,4 +427,4 @@ public function checkCurrentMailbox(){
426427
return imap_check($this->connection);
427428
}
428429

429-
}
430+
}

0 commit comments

Comments
 (0)