summaryrefslogtreecommitdiff
path: root/report.php
diff options
context:
space:
mode:
Diffstat (limited to 'report.php')
-rw-r--r--report.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/report.php b/report.php
index e09b1075..c55d0d93 100644
--- a/report.php
+++ b/report.php
@@ -1,10 +1,10 @@
<?php
include 'inc/functions.php';
$global = isset($_GET['global']);
-$post = (isset($_GET['post']) ? $_GET['post'] : false);
-$board = (isset($_GET['board']) ? $_GET['board'] : false);
+$post = ($_GET['post'] ?? false);
+$board = ($_GET['board'] ?? false);
-if (!$post || !preg_match('/^delete_\d+$/', $post) || !$board || !openBoard($board)) {
+if (!$post || !preg_match('/^delete_\d+$/', (string) $post) || !$board || !openBoard($board)) {
header('HTTP/1.1 400 Bad Request');
error(_('Bad request.'));
}