From: Jan Schneider Date: Thu, 26 Feb 2009 23:14:56 +0000 (+0100) Subject: Return immediately if we don't have start and end dates. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=57f51abb57b20c0b45184fdc7d10e139d1380979;p=horde.git Return immediately if we don't have start and end dates. --- 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();