From ea92f1128c91567ad11a8ad1df58cc59ddb1b2d1 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Wed, 20 Oct 2010 11:39:11 -0400 Subject: [PATCH] Catch errors from remote calendars, they shouldn't cause fatal errors. --- kronolith/lib/Kronolith.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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'); } } -- 2.11.0