Skip to content
This repository was archived by the owner on Apr 27, 2025. It is now read-only.

Commit 0a09996

Browse files
Fix vote insertion on master servers.
1 parent a57fad4 commit 0a09996

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ProjectInfinity/PocketVote/task/VoteCheckTask.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ public function onRun() {
9393
return;
9494
}
9595
$time = time();
96-
foreach($votes as $vote) {
96+
foreach($r->getVotes() as $vote) {
97+
if($vote->player === null || $vote->site === null) continue;
9798
$stmt = $db->prepare('INSERT INTO `pocketvote_votes` (`player`, `ip`, `site`, `timestamp`) VALUES (?, ?, ?, ?)');
9899
$stmt->bind_param('sssi', $vote->player, $vote->ip, $vote->site, $time);
99100
$stmt->execute();

0 commit comments

Comments
 (0)