From: terry%mozilla.org <> Date: Thu, 14 Oct 1999 03:17:01 +0000 (+0000) Subject: Removing the last vote on a bug was causing an SQL error. X-Git-Tag: bugzilla-2.8~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea61ebd4593458dae0ae17cc7d0cc29fd319791a;p=thirdparty%2Fbugzilla.git Removing the last vote on a bug was causing an SQL error. --- diff --git a/doeditvotes.cgi b/doeditvotes.cgi index 2584d583b4..ee0bf1ad7d 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");