Commit 9e496cd9 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 301261: uninitialized value in Search.pm when querying by date - Patch by…

Bug 301261: uninitialized value in Search.pm when querying by date - Patch by Albert Ting <altlst@sonic.net> r=LpSolit a=justdave
parent 72bdf0f9
......@@ -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';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment