sunnyman's (sunnyman) wrote in changelog,
sunnyman's
sunnyman
changelog

[livejournal] r19693: LJSUP-9336: fixed 0 values passed as ans...

Committer: vtroitsky
LJSUP-9336: fixed 0 values passed as answers
U   trunk/cgi-bin/LJ/Poll.pm
Modified: trunk/cgi-bin/LJ/Poll.pm
===================================================================
--- trunk/cgi-bin/LJ/Poll.pm	2011-08-11 03:33:12 UTC (rev 19692)
+++ trunk/cgi-bin/LJ/Poll.pm	2011-08-11 03:50:11 UTC (rev 19693)
@@ -1866,9 +1866,8 @@
     if ($opts{wrong_value_as_error}) {
         foreach my $q (@qs) {
             my $qid = $q->pollqid;
+            next unless (defined $answers->{$qid}); # check given values only, so allow the user to change his mind
             my $val = $answers->{$qid};
-            next unless ($val);   # check given values only, so allow the user to change his mind
-
             my @vals = ();
             if ($q->type eq "check") {
                 ## multi-selected items are comma separated from htdocs/poll/index.bml

Tags: livejournal, pm, sunnyman
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments