Check for definition of itid variable, not true value.

        Patch by yvi. 

diffs (12 lines):

diff -r 447ebe49b766 -r efb303765aaa cgi-bin/LJ/Poll.pm
--- a/cgi-bin/LJ/Poll.pm        Mon Nov 08 20:35:32 2010 +0800
+++ b/cgi-bin/LJ/Poll.pm        Mon Nov 08 21:31:44 2010 -0600
@@ -1134,7 +1134,7 @@ sub render {
                 }
 
                 # displaying results
-                my $count = $itid ? $itvotes{$itid} || 0 : 0;
+                my $count = ( defined $itid ) ? $itvotes{$itid} || 0 : 0;
                 my $percent = sprintf("%.1f", (100 * $count / 
($usersvoted||1)));
                 my $width = 20+int(($count/$maxitvotes)*380);
 
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to