diff --git a/htdocs/public/project/viewandvote.php b/htdocs/public/project/viewandvote.php index 304f42d637b..333edd81755 100644 --- a/htdocs/public/project/viewandvote.php +++ b/htdocs/public/project/viewandvote.php @@ -175,17 +175,13 @@ if (strlen($idvote)) { $errmsg .= $conforbooth->error; } else { // Process to vote - if ($res) { - $conforbooth->num_vote++; - $resupdate = $conforbooth->update($user); - if ($resupdate) { - $votestatus = 'ok'; - $_SESSION["savevotes"] = $hashedvote.','.(empty($_SESSION["savevotes"]) ? '' : $_SESSION["savevotes"]); // Save voter - } else { - //Error during update - $votestatus = 'err'; - } + $conforbooth->num_vote++; + $resupdate = $conforbooth->update($user); + if ($resupdate) { + $votestatus = 'ok'; + $_SESSION["savevotes"] = $hashedvote.','.(empty($_SESSION["savevotes"]) ? '' : $_SESSION["savevotes"]); // Save voter } else { + //Error during update $votestatus = 'err'; } }