]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Removing the last vote on a bug was causing an SQL error.
authorterry%mozilla.org <>
Thu, 14 Oct 1999 03:17:01 +0000 (03:17 +0000)
committerterry%mozilla.org <>
Thu, 14 Oct 1999 03:17:01 +0000 (03:17 +0000)
doeditvotes.cgi

index 2584d583b4691463ccbef24f0527119afb85392a..ee0bf1ad7d85c4dd0df4507d6d125ea7419356bb 100755 (executable)
@@ -103,6 +103,7 @@ foreach my $id (@buglist) {
 foreach my $id (keys %affected) {
     SendSQL("select sum(count) from votes where bug_id = $id");
     my $v = FetchOneColumn();
+    $v ||= 0;
     SendSQL("update bugs set votes = $v, delta_ts=delta_ts where bug_id = $id");
 }
 SendSQL("unlock tables");