Catch errors.
authorJan Schneider <jan@horde.org>
Tue, 14 Apr 2009 20:18:12 +0000 (22:18 +0200)
committerJan Schneider <jan@horde.org>
Sun, 3 May 2009 22:41:02 +0000 (00:41 +0200)
imp/mailbox.php

index c3511c9..5464eac 100644 (file)
@@ -768,7 +768,10 @@ while (list(,$ob) = each($mbox_info['overview'])) {
 
     /* Get all the flag information. */
     if (!empty($GLOBALS['conf']['hooks']['msglist_flags'])) {
-        $ob['flags'] = array_merge($ob['flags'], Horde::callHook('_imp_hook_msglist_flags', array($ob, 'imp'), 'imp'));
+        $flags = Horde::callHook('_imp_hook_msglist_flags', array($ob, 'imp'), 'imp');
+        if (!is_a($flags, 'PEAR_Error')) {
+            $ob['flags'] = array_merge($ob['flags'], $flags);
+        }
     }
 
     $flag_parse = $imp_flags->parse(array(