From b7eddb0868ad3c70a1cfaf13696b49244c2213a2 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Mon, 15 Feb 2010 15:43:46 +0100 Subject: [PATCH] Horde_Share doesn't throw exceptions yet. --- kronolith/lib/FreeBusy.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kronolith/lib/FreeBusy.php b/kronolith/lib/FreeBusy.php index 5746e94d8..a73b4b89e 100644 --- a/kronolith/lib/FreeBusy.php +++ b/kronolith/lib/FreeBusy.php @@ -32,10 +32,8 @@ class Kronolith_FreeBusy } /* Fetch the appropriate share and check permissions. */ - try { - $share = $kronolith_shares->getShare($calendar[0]); - $owner = $share->get('owner'); - } catch (Exception $e) { + $share = $kronolith_shares->getShare($calendar[0]); + if ($share instanceof PEAR_Error) { // Might be a Kronolith_Resource try { $resource = Kronolith_Resource::isResourceCalendar($calendar[0]); @@ -43,6 +41,8 @@ class Kronolith_FreeBusy } catch (Horde_Exception $e) { return $returnObj ? $share : ''; } + } else { + $owner = $share->get('owner'); } /* Default the start date to today. */ -- 2.11.0