0) { echo render_info_or_json($isXHR, 'You have been banned, check your profile for more information.', 403); return; } if (user_warning_check_expiration($currentUserId, MSZ_WARN_SILENCE) > 0) { echo render_info_or_json($isXHR, 'You have been silenced, check your profile for more information.', 403); return; } header(csrf_http_header('forum_poll')); if (empty($_POST['polls']) || !is_array($_POST['polls'])) { echo render_info_or_json($isXHR, "Invalid request.", 400); return; } foreach ($_POST['polls'] as $pollId => $answerId) { if (!is_int($pollId) || !is_string($answerId) || !ctype_digit($answerId)) { continue; } $answerId = (int)$answerId; var_dump($pollId, $answerId); }