logic update...

This commit is contained in:
Lewis Cowles 2015-05-24 12:27:42 +01:00
parent 470cc114b0
commit 5e11d722ad

View File

@ -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);
}