Make sure imap_ob exists
authorMichael M Slusarz <slusarz@curecanti.org>
Sat, 15 Aug 2009 18:22:02 +0000 (12:22 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Sat, 15 Aug 2009 20:06:22 +0000 (14:06 -0600)
imp/lib/Notification/Listener/Status.php

index a49ac98..ad71108 100644 (file)
@@ -75,8 +75,10 @@ class IMP_Notification_Listener_Status extends Horde_Notification_Listener_Statu
         }
 
         /* Display IMAP alerts. */
-        foreach ($GLOBALS['imp_imap']->ob->alerts() as $alert) {
-            $GLOBALS['notification']->push($alert, 'horde.warning');
+        if (isset($GLOBALS['imp_imap']->ob)) {
+            foreach ($GLOBALS['imp_imap']->ob->alerts() as $alert) {
+                $GLOBALS['notification']->push($alert, 'horde.warning');
+            }
         }
 
         parent::notify($messageStack, $options);