From: Michael J. Rubinsky Date: Wed, 20 Oct 2010 15:39:11 +0000 (-0400) Subject: Catch errors from remote calendars, they shouldn't cause fatal errors. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=ea92f1128c91567ad11a8ad1df58cc59ddb1b2d1;p=horde.git Catch errors from remote calendars, they shouldn't cause fatal errors. --- diff --git a/kronolith/lib/Kronolith.php b/kronolith/lib/Kronolith.php index de785d7d7..08937569f 100644 --- a/kronolith/lib/Kronolith.php +++ b/kronolith/lib/Kronolith.php @@ -1561,11 +1561,15 @@ class Kronolith } foreach ($GLOBALS['all_remote_calendars'] as $id => $calendar) { - if ($calendar->hasPermission($permission) && - (!$display || $calendar->display())) { - if ($flat) { - $calendars['remote_' . $id] = $calendar; + try { + if ($calendar->hasPermission($permission) && + (!$display || $calendar->display())) { + if ($flat) { + $calendars['remote_' . $id] = $calendar; + } } + } catch (Kronolith_Exception $e) { + $GLOBALS['notification']->push(sprintf(_("The calendar %s returned the error: %s"), $calendar->name(), $e->getMessage()), 'horde.error'); } }