瀏覽代碼

! 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 年之前
父節點
當前提交
102f63ac11
共有 1 個文件被更改,包括 1 次插入1 次删除
  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']('', '