From be2eafd4fca2db9e34dec9508fd2bc8d56dd4b63 Mon Sep 17 00:00:00 2001 From: Fredrick Brennan Date: Fri, 27 Jul 2018 19:20:38 +0800 Subject: [PATCH] Fix reports under PHP7.2 You'll need to delete all reports made before applying this patch for it to work right. However, all reports made after applying this patch will appear correctly in `mod.php?/reports`. This closes #300. --- post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/post.php b/post.php index a446e32b..3851dadb 100644 --- a/post.php +++ b/post.php @@ -332,7 +332,7 @@ if (isset($_POST['delete'])) { $query = prepare("INSERT INTO ``reports`` VALUES (NULL, :time, :ip, :board, :post, :reason)"); $query->bindValue(':time', time(), PDO::PARAM_INT); $query->bindValue(':ip', $_SERVER['REMOTE_ADDR'], PDO::PARAM_STR); - $query->bindValue(':board', $board['uri'], PDO::PARAM_INT); + $query->bindValue(':board', $board['uri'], PDO::PARAM_STR); $query->bindValue(':post', $id, PDO::PARAM_INT); $query->bindValue(':reason', $reason, PDO::PARAM_STR); $query->execute() or error(db_error($query));