From: Michael J. Rubinsky Date: Tue, 27 Apr 2010 16:51:13 +0000 (-0400) Subject: Kronolith::getDefaultCalendar() can return a boolean false, which X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=06daf822929afcb37284d95c4181fb54dee4bccc;p=horde.git Kronolith::getDefaultCalendar() can return a boolean false, which causes as warning in array_key_exists(), so explicitly check for this also --- diff --git a/kronolith/lib/Api.php b/kronolith/lib/Api.php index f95015ffe..598212c7b 100644 --- a/kronolith/lib/Api.php +++ b/kronolith/lib/Api.php @@ -492,8 +492,8 @@ class Kronolith_Api extends Horde_Registry_Api $calendar = Kronolith::getDefaultCalendar(); } - if (!array_key_exists($calendar, - Kronolith::listCalendars(false, Horde_Perms::READ))) { + if ($calendar === false || + !array_key_exists($calendar, Kronolith::listCalendars(false, Horde_Perms::READ))) { throw new Horde_Exception_PermissionDenied(); }