]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 325361: When an event is scheduled at midnight of a given day of the month, one...
authorlpsolit%gmail.com <>
Fri, 3 Feb 2006 03:09:01 +0000 (03:09 +0000)
committerlpsolit%gmail.com <>
Fri, 3 Feb 2006 03:09:01 +0000 (03:09 +0000)
editwhines.cgi
whine.pl

index f7e773fcc78f940c688f1a908194188c999f14fb..f9b376e07f30d5d79eb14d5f227db87a1dd6cce6 100755 (executable)
@@ -223,8 +223,8 @@ if ($cgi->param('update')) {
                 else {
                     my $o_day         = $cgi->param("orig_day_$sid") || '';
                     my $day           = $cgi->param("day_$sid") || '';
-                    my $o_time        = $cgi->param("orig_time_$sid") || '';
-                    my $time          = $cgi->param("time_$sid") || '';
+                    my $o_time        = $cgi->param("orig_time_$sid") || 0;
+                    my $time          = $cgi->param("time_$sid") || 0;
                     my $o_mailto      = $cgi->param("orig_mailto_$sid") || '';
                     my $mailto        = $cgi->param("mailto_$sid") || '';
                     my $o_mailto_type = $cgi->param("orig_mailto_type_$sid") || 0;
index 4068a052f612dde30658e36f6515f44867cf9482..96356f1fab5addd9ea00a3b40de6a6dfb8b715a0 100755 (executable)
--- a/whine.pl
+++ b/whine.pl
@@ -568,6 +568,10 @@ sub reset_timer {
     $sth->execute($schedule_id);
     my ($run_day, $run_time) = $sth->fetchrow_array;
 
+    # It may happen that the run_time field is NULL or blank due to
+    # a bug in editwhines.cgi when this field was initially 0.
+    $run_time ||= 0;
+
     my $run_today = 0;
     my $minute_offset = 0;