summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorterry%mozilla.org <>1999-10-14 05:17:01 +0200
committerterry%mozilla.org <>1999-10-14 05:17:01 +0200
commitea61ebd4593458dae0ae17cc7d0cc29fd319791a (patch)
tree3fc7ce1dbb4cdbda99071a8829f584ac3e876ca5
parente18c6fd41b16c91ccb6fbca903b0716af37f27c2 (diff)
downloadbugzilla-ea61ebd4593458dae0ae17cc7d0cc29fd319791a.tar.gz
bugzilla-ea61ebd4593458dae0ae17cc7d0cc29fd319791a.tar.xz
Removing the last vote on a bug was causing an SQL error.
-rwxr-xr-xdoeditvotes.cgi1
1 files changed, 1 insertions, 0 deletions
diff --git a/doeditvotes.cgi b/doeditvotes.cgi
index 2584d583b..ee0bf1ad7 100755
--- a/doeditvotes.cgi
+++ b/doeditvotes.cgi
@@ -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");