Active
Project:
Pollfield
Version:
6.x-1.11-beta1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Apr 2010 at 18:19 UTC
Updated:
14 Mar 2011 at 01:37 UTC
When the user doesn't choose a response and clicks on Vote on a multiple choice question, this error happens:
warning: Invalid argument supplied for foreach() in /sites/all/modules/pollfield/pollfield.module on line 1168.
If the question is Single choice and the user doesn't choose a response and clicks on Vote then module saves the first item as users vote
Comments
Comment #1
ginc commentedsome more info:
to reproduce the bug, create a content type with pollfield and set it to unlimited. then create a new node using your content type and add 4 polls, the first 2 Single choice, and others Multiple choice, save the node, answer questions via second user, now edit the node and move the 3rd poll up, before the first poll, save the node, now you will experience the bug while voting via the third user. the result of second user shown incorrectly and you choosing multiple choices result the vote on only one choice which is not necessarily one of the options you choose.
i haven't look at the code yet, but it seems to me that in the case i described, somehow the process logic of "multiple choice" used for "Single choice" and vice versa. also the way of saving the result doesn't consider the situation when polls are moved up and down by the end user
Comment #2
mario_prkos commentedReference:
http://drupal.org/node/762582#comment-2829560
Comment #3
nibblebot commentedstatus?
Comment #4
stinky commentedsubscribe