From: Chuck Hagenbuch Date: Mon, 4 May 2009 03:33:54 +0000 (-0400) Subject: fix dealiasAndDisambiguateTimes X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=55b1086851ec8548cc1ed5a3295d95a49d73ce4c;p=horde.git fix dealiasAndDisambiguateTimes --- diff --git a/framework/Date_Parser/lib/Horde/Date/Parser/Locale/Base.php b/framework/Date_Parser/lib/Horde/Date/Parser/Locale/Base.php index a9029b86d..ca9cb3682 100644 --- a/framework/Date_Parser/lib/Horde/Date/Parser/Locale/Base.php +++ b/framework/Date_Parser/lib/Horde/Date/Parser/Locale/Base.php @@ -600,14 +600,14 @@ class Horde_Date_Parser_Locale_Base } } - if ($dayPortionIndex && $timeIndex) { + if ($dayPortionIndex !== null && $timeIndex !== null) { $t1 = $tokens[$dayPortionIndex]; $t1tag = $t1->getTag('repeater_day_portion'); - if ($t1tag == 'morning') { + if ($t1tag->type == 'morning') { $t1->untag('repeater_day_portion'); $t1->tag('repeater_day_portion', new Horde_Date_Repeater_DayPortion('am')); - } elseif (in_array($t1tag, array('afternoon', 'evening', 'night'))) { + } elseif (in_array($t1tag->type, array('afternoon', 'evening', 'night'))) { $t1->untag('repeater_day_portion'); $t1->tag('repeater_day_portion', new Horde_Date_Repeater_DayPortion('pm')); }