From 57f51abb57b20c0b45184fdc7d10e139d1380979 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Fri, 27 Feb 2009 00:14:56 +0100 Subject: [PATCH] Return immediately if we don't have start and end dates. --- kronolith/lib/Driver/Holidays.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/kronolith/lib/Driver/Holidays.php b/kronolith/lib/Driver/Holidays.php index 6c7769dfc..d5bbb1572 100644 --- a/kronolith/lib/Driver/Holidays.php +++ b/kronolith/lib/Driver/Holidays.php @@ -42,13 +42,10 @@ class Kronolith_Driver_Holidays extends Kronolith_Driver __FILE__, __LINE__, PEAR_LOG_ERR); return array(); } - - if (is_null($startDate)) { - $startDate = new Horde_Date($_SERVER['REQUEST_TIME']); - } - if (is_null($endDate)) { - $endDate = new Horde_Date($_SERVER['REQUEST_TIME']); + if ($hasAlarm || is_null($startDate) || is_null($endDate)) { + return array(); } + Date_Holidays::staticSetProperty('DIE_ON_MISSING_LOCALE', false); $events = array(); -- 2.11.0