mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 301261: uninitialized value in Search.pm when querying by date - Patch by Albert Ting <altlst@sonic.net> r=LpSolit a=justdave
This commit is contained in:
parent
81b34ec958
commit
756f284d43
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user