Catch exception.
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 16 Dec 2008 07:04:22 +0000 (00:04 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 16 Dec 2008 08:53:16 +0000 (01:53 -0700)
imp/ajax.php

index d642778..a1ef86e 100644 (file)
@@ -49,7 +49,11 @@ function _changed($mbox, $compare, $rw = null)
     /* We know we are going to be dealing with this mailbox, so select it on
      * the IMAP server (saves some STATUS calls). */
     if (!is_null($rw) && !$GLOBALS['imp_search']->isSearchMbox($mbox)) {
-        $GLOBALS['imp_imap']->ob->openMailbox($mbox, $rw ? Horde_Imap_Client::OPEN_READWRITE : Horde_Imap_Client::OPEN_AUTO);
+        try {
+            $GLOBALS['imp_imap']->ob->openMailbox($mbox, $rw ? Horde_Imap_Client::OPEN_READWRITE : Horde_Imap_Client::OPEN_AUTO);
+        } catch (Horde_Imap_Client_Exception $e) {
+            return false;
+        }
     }
 
     $imp_mailbox = &IMP_Mailbox::singleton($mbox);