From: Michael M Slusarz Date: Tue, 25 Nov 2008 07:48:31 +0000 (-0700) Subject: There may be no unseen messages in the mailbox. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=f83ac562f28c9328885c2e10df0155186e24a9a8;p=horde.git There may be no unseen messages in the mailbox. --- diff --git a/imp/lib/Mailbox.php b/imp/lib/Mailbox.php index 026ba881c..f9c9f7c6e 100644 --- a/imp/lib/Mailbox.php +++ b/imp/lib/Mailbox.php @@ -470,7 +470,7 @@ class IMP_Mailbox if ($sortpref['by'] == Horde_Imap_Client::SORT_ARRIVAL) { try { $res = $GLOBALS['imp_imap']->ob->status($this->_mailbox, Horde_Imap_Client::STATUS_FIRSTUNSEEN); - $page_uid = $this->_sorted[$res['firstunseen'] - 1]; + $page_uid = is_null($res['firstunseen']) ? null : $this->_sorted[$res['firstunseen'] - 1]; } catch (Horde_Imap_Client_Exception $e) {} } else { $unseen_msgs = $this->unseenMessages(Horde_Imap_Client::SORT_RESULTS_MIN);