Skip to content

Commit

Permalink
Merge pull request #126 from kevinsmith/hotfix/fix_reset_imapstream
Browse files Browse the repository at this point in the history
Fix an issue where the IMAP stream isn't reloaded after it's lost.
  • Loading branch information
tedivm committed Mar 31, 2015
2 parents b5b790e + f0b6c14 commit 6a6d909
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Fetch/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public function setParam($key, $value)
*/
public function getImapStream()
{
if (!isset($this->imapStream))
if (empty($this->imapStream))
$this->setImapStream();

return $this->imapStream;
Expand Down Expand Up @@ -302,7 +302,7 @@ protected function getServerSpecification()
*/
protected function setImapStream()
{
if (isset($this->imapStream)) {
if (!empty($this->imapStream)) {
if (!imap_reopen($this->imapStream, $this->getServerString(), $this->options, 1))
throw new \RuntimeException(imap_last_error());
} else {
Expand Down

0 comments on commit 6a6d909

Please sign in to comment.