Skip to content

Commit

Permalink
make sure imap connection are reopened
Browse files Browse the repository at this point in the history
  • Loading branch information
joserobleda committed Mar 20, 2015
1 parent 66ee8a9 commit e6f8fa2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Mailbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public function addMessage($message)
private function init()
{
$check = imap_check($this->connection->getResource());
if ($check->Mailbox != $this->mailbox) {
if ($check === false || $check->Mailbox != $this->mailbox) {
imap_reopen($this->connection->getResource(), $this->mailbox);
}
}
Expand Down

0 comments on commit e6f8fa2

Please sign in to comment.