From: Jan Schneider Date: Mon, 15 Feb 2010 14:43:46 +0000 (+0100) Subject: Horde_Share doesn't throw exceptions yet. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=b7eddb0868ad3c70a1cfaf13696b49244c2213a2;p=horde.git Horde_Share doesn't throw exceptions yet. --- 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. */