This commit is contained in:
2021-04-17 16:04:34 +02:00
parent 8e6b0d3687
commit 52ee54f5f9
7 changed files with 75 additions and 50 deletions

View File

@ -12,11 +12,12 @@ if (is_array($_POST['options'])) {
try {
$res = $api->voteInPoll((int)$_POST['pollid'], $voted_options, $_POST['polltoken']);
} catch (\Exception $e) {
get_page_header('Voting error');
$str = 'Sorry, something went wrong while voting! "'
$header = get_page_header('Voting error');
$str = $header
. 'Sorry, something went wrong while voting! "'
. $e->getMessage()
. '"<br>Please yell at <a href="https://pnut.io/@hutattedonmyarm">@hutattedonmyarm</a><br>'
. '<a href="view_poll.php?id='.$_POST['pollid'].'"s>Go back to the poll</a>';
die($str);
quit($str);
}
redirect('view_poll.php?id='.$_POST['pollid'].'&success=1');