From 756f284d4307b50fc063343e753aea40a38cf7fc Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" Date: Fri, 5 Aug 2005 18:54:42 +0000 Subject: [PATCH] Bug 301261: uninitialized value in Search.pm when querying by date - Patch by Albert Ting r=LpSolit a=justdave --- webtools/bugzilla/Bugzilla/Search.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webtools/bugzilla/Bugzilla/Search.pm b/webtools/bugzilla/Bugzilla/Search.pm index 7e545cf46117..31dbcd2ab549 100644 --- a/webtools/bugzilla/Bugzilla/Search.pm +++ b/webtools/bugzilla/Bugzilla/Search.pm @@ -1423,7 +1423,7 @@ sub SqlifyDate { if ($str =~ /^(-|\+)?(\d+)([hHdDwWmMyY])$/) { # relative date my ($sign, $amount, $unit, $date) = ($1, $2, lc $3, time); my ($sec, $min, $hour, $mday, $month, $year, $wday) = localtime($date); - if ($sign eq '+') { $amount = -$amount; } + if ($sign && $sign eq '+') { $amount = -$amount; } if ($unit eq 'w') { # convert weeks to days $amount = 7*$amount + $wday; $unit = 'd';