Browse Source

! Guests could not submit multiple votes to a poll without errors. Funnily enough, it did not adversly affect workflow.

Signed-off-by: John Rayes <[email protected]>
John Rayes 10 years ago
parent
commit
102f63ac11
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Sources/Poll.php

+ 1 - 1
Sources/Poll.php

@@ -197,7 +197,7 @@ function Vote()
 		// Time is stored in case the poll is reset later, plus what they voted for.
 		$_COOKIE['guest_poll_vote'] = empty($_COOKIE['guest_poll_vote']) ? '' : $_COOKIE['guest_poll_vote'];
 		// ;id,timestamp,[vote,vote...]; etc
-		$_COOKIE['guest_poll_vote'] .= ';' . $row['id_poll'] . ',' . time() . ',' . (count($pollOptions) > 1 ? explode(',' . $pollOptions) : $pollOptions[0]);
+		$_COOKIE['guest_poll_vote'] .= ';' . $row['id_poll'] . ',' . time() . ',' . implode(',', $pollOptions);
 
 		// Increase num guest voters count by 1
 		$smcFunc['db_query']('', '