Merge pull request #126 from kevinsmith/hotfix/fix_reset_imapstream

Fix an issue where the IMAP stream isn't reloaded after it's lost.
This commit is contained in:
Robert Hafner 2015-03-31 09:57:57 -07:00
commit 6a6d909c17

View File

@ -250,7 +250,7 @@ class Server
*/
public function getImapStream()
{
if (!isset($this->imapStream))
if (empty($this->imapStream))
$this->setImapStream();
return $this->imapStream;
@ -302,7 +302,7 @@ class Server
*/
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 {