From 39d0c8ad22faa03e471c86ed250aec8299e555e2 Mon Sep 17 00:00:00 2001 From: v1r0x Date: Thu, 17 Mar 2016 21:29:27 +0100 Subject: [PATCH] fix null pointer --- controller/pagecontroller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller/pagecontroller.php b/controller/pagecontroller.php index f0109bc4b..d4a00217b 100644 --- a/controller/pagecontroller.php +++ b/controller/pagecontroller.php @@ -363,8 +363,8 @@ public function insertVote($pollId, $userId, $types, $dates, $notif, $changed) { } else { $userId = $userId . ' (extern)'; } + $poll = $this->eventMapper->find($pollId); if($changed === 'true') { - $poll = $this->eventMapper->find($pollId); $dates = json_decode($dates); $types = json_decode($types); if($poll->getType() === '0') $this->participationMapper->deleteByPollAndUser($pollId, $userId);