Fix when adding poll = template tibiacom broken

With Exception and red message
This commit is contained in:
slawkens
2020-10-12 21:58:20 +02:00
parent 2e5b066d88
commit 091ab688e7
2 changed files with 4 additions and 5 deletions

View File

@@ -6,7 +6,7 @@ if(PAGE !== 'news') {
$poll = $db->query('SELECT `id`, `question` FROM `z_polls` WHERE end > ' . time() . ' ORDER BY `end` LIMIT 1');
if($poll->rowCount() > 0) {
$poll = $poll->fetch();
$poll = $poll->fetch(PDO::FETCH_ASSOC);
$twig->display('poll.html.twig', array(
'poll' => $poll
));