From 5e11d722ad3508831fc52a4edfc03c1a960db2a0 Mon Sep 17 00:00:00 2001 From: Lewis Cowles Date: Sun, 24 May 2015 12:27:42 +0100 Subject: [PATCH] logic update... --- src/Fetch/Server.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Fetch/Server.php b/src/Fetch/Server.php index 7c4bb44..3b401ca 100644 --- a/src/Fetch/Server.php +++ b/src/Fetch/Server.php @@ -324,11 +324,11 @@ class Server public function numMessages($mailbox='') { $oldMailbox = $this->getMailBox(); - $mboxExists = ($this->hasMailbox($mailbox) && $oldMailbox != $mailbox); + $mboxExists = ($this->hasMailbox($mailbox) && $oldMailbox !== $mailbox && $mailbox !== ''); if ($mboxExists){ $this->setMailbox($mailbox); } - $cnt = imap_num_msg($this->getImapStream()); + $cnt = imap_num_msg( $this->getImapStream() ); if ($mboxExists){ $this->setMailbox($oldMailbox); }