Quote:
Originally Posted by J98680B2423E
The following edit was made in "functions_nominate_topic.php" on v 1.22 to prevent that error:
Code:
if ($vote_option > 0){
$get_pollvote = $vbulletin->db->query_read("SELECT * FROM ". TABLE_PREFIX ."pollvote WHERE userid = '$user_id' AND pollid = '$poll_id' AND voteoption = '$vote_option' AND votetype ='$vote_option'");
$nb_pollvote = $vbulletin->db->num_rows($get_pollvote);
if ($nb_pollvote == 0){
$vbulletin->db->query_write("INSERT INTO " . TABLE_PREFIX . "pollvote (pollid,userid,votedate,voteoption,votetype) VALUES ('$poll_id','$user_id','$now','$vote_option','$vote_option')");
}
}
From your report:
$vote_option = 6, the same value is assigned to 'votetype' in the "functions_nominate_topic.php" up-to-date file, see code above, and not ' 0' as shown on your feedback above, hence this error will not occur if you have the file "functions_nominate_topic.php" not up-to-date.
Redownload the attachment and upload the "functions_nominate_topic.php".
|
I have redownloaded v1.22 and I have instide the file:
PHP Code:
//$vote_option = array_search($post_id, $arrayPostID);
if ($vote_option > 0){
$get_pollvote = $vbulletin->db->query_read("SELECT * FROM ". TABLE_PREFIX ."pollvote WHERE userid = '$user_id' AND pollid = '$poll_id' AND voteoption = '$vote_option' AND votetype ='$vote_option'");
$nb_pollvote = $vbulletin->db->num_rows($get_pollvote);
if ($nb_pollvote == 0){
$vbulletin->db->query_write("INSERT INTO " . TABLE_PREFIX . "pollvote (pollid,userid,votedate,voteoption,votetype) VALUES ('$poll_id','$user_id','$now','$vote_option','$vote_option')");
}
}
Is this correct or not? If not then the archive needs updating?