Skip to content

Commit 8d98946

Browse files
authored
Merge pull request #20 from dansleboby/patch-1
#19
2 parents 6e9215a + b706aef commit 8d98946

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ All notable changes to `webklex/laravel-imap` will be documented in this file.
55
Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
66

77
## [UNRELEASED]
8+
### Fixed
9+
- Fix implode error in Client.php, beacause imap_errors() can return FALSE instand of array
10+
811
### Added
912
-FT_UID changed to $this->options which references to `imap.options.fetch`
1013

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)