From 76d2003a35dd9019620b9bce45bde75314e33f28 Mon Sep 17 00:00:00 2001 From: Chuck Hagenbuch Date: Sun, 24 May 2009 23:03:39 -0400 Subject: [PATCH] fix numerizer _andition() error --- framework/Date_Parser/lib/Horde/Support/Numerizer/Locale/Base.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/Date_Parser/lib/Horde/Support/Numerizer/Locale/Base.php b/framework/Date_Parser/lib/Horde/Support/Numerizer/Locale/Base.php index b6cc380a5..0a1908ef4 100644 --- a/framework/Date_Parser/lib/Horde/Support/Numerizer/Locale/Base.php +++ b/framework/Date_Parser/lib/Horde/Support/Numerizer/Locale/Base.php @@ -125,7 +125,7 @@ class Horde_Support_Numerizer_Locale_Base { while (true) { if (preg_match('/(\d+)( | and )(\d+)(?=[^\w]|$)/i', $string, $sc, PREG_OFFSET_CAPTURE)) { - if (preg_match('/and/', $sc[2][0]) || $sc[1][0] > $sc[3][0]) { + if (preg_match('/and/', $sc[2][0]) || (strlen($sc[1][0]) > strlen($sc[3][0]))) { $string = substr($string, 0, $sc[1][1]) . ((int)$sc[1][0] + (int)$sc[3][0]) . substr($string, $sc[3][1] + strlen($sc[3][0])); continue; } -- 2.11.0