findById((int)($_POST['threadid'] ?? 0)); if (is_null($poll)) { Error404::error(); } if ($poll->isClosed()) { Error403::error(); } $vote = $poll->vote(); if (!isset($_POST['vote']) || !is_number($_POST['vote'])) { ?> Please select an option.
$choice) { ?>



addVote($Viewer, $response)) { Error400::error('Cannot add your vote to the poll'); } $vote = $poll->vote(); // need to refresh the results to take the vote into account if ($response !== 0) { $vote[$response]['answer'] = '» ' . $vote[$response]['answer']; } ?>
Votes: total()) ?>