From 06daf822929afcb37284d95c4181fb54dee4bccc Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Tue, 27 Apr 2010 12:51:13 -0400 Subject: [PATCH] Kronolith::getDefaultCalendar() can return a boolean false, which causes as warning in array_key_exists(), so explicitly check for this also --- kronolith/lib/Api.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(); } -- 2.11.0