diff options
author | mkanat%kerio.com <> | 2005-02-25 12:28:01 +0100 |
---|---|---|
committer | mkanat%kerio.com <> | 2005-02-25 12:28:01 +0100 |
commit | 1414db6ba6c7508bf6e0e4c1191218aa71d7ce43 (patch) | |
tree | 671f0025ffcadcd94848b36982f49c3256021aab /process_bug.cgi | |
parent | 94c2df0e830ea7070436f8ade182645893ac3373 (diff) | |
download | bugzilla-1414db6ba6c7508bf6e0e4c1191218aa71d7ce43.tar.gz bugzilla-1414db6ba6c7508bf6e0e4c1191218aa71d7ce43.tar.xz |
Bug 282748: uninitialized value in localtime in Format.pm
Patch By Frederic Buclin <LpSolit@gmail.com> r=wurblzap, a=myk
Diffstat (limited to 'process_bug.cgi')
-rwxr-xr-x | process_bug.cgi | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/process_bug.cgi b/process_bug.cgi index c1f3c33bb..3eccfa370 100755 --- a/process_bug.cgi +++ b/process_bug.cgi @@ -1767,7 +1767,17 @@ foreach my $id (@idlist) { { $check_dep_bugs = 1; } - + + # Convert deadlines to the YYYY-MM-DD format. We use an + # intermediate $xxxtime to prevent errors in the web + # server log file when str2time($xxx) is undefined. + if ($col eq 'deadline') { + my $oldtime = str2time($old); + $old = ($oldtime) ? time2str("%Y-%m-%d", $oldtime) : ''; + my $newtime = str2time($new); + $new = ($newtime) ? time2str("%Y-%m-%d", $newtime) : ''; + } + LogActivityEntry($id,$col,$old,$new,$whoid,$timestamp); $bug_changed = 1; } |