From: lpsolit%gmail.com <> Date: Sat, 6 Aug 2005 01:58:35 +0000 (+0000) Subject: Bug 301261: uninitialized value in Search.pm when querying by date - Patch by Albert... X-Git-Tag: bugzilla-2.20rc2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b875fa4381f82935daf77b7c42360d9ccb1cd4e4;p=thirdparty%2Fbugzilla.git Bug 301261: uninitialized value in Search.pm when querying by date - Patch by Albert Ting r=LpSolit a=justdave --- diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm index 098cca7edb..c73d806c11 100644 --- a/Bugzilla/Search.pm +++ b/Bugzilla/Search.pm @@ -1419,7 +1419,7 @@ sub SqlifyDate { if ($str =~ /^(-|\+)?(\d+)([dDwWmMyY])$/) { # 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';