From e15e966cdbda7b658af27b1a498606a82e8f8c5e Mon Sep 17 00:00:00 2001 From: Daniel Saunders Date: Wed, 7 Aug 2019 20:31:37 -0400 Subject: [PATCH] Fix a bug related to deleting boards (see https://github.com/vichan-devel/vichan/issues/331) --- inc/mod/pages.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/mod/pages.php b/inc/mod/pages.php index 24205a9e..4e2d6eaf 100644 --- a/inc/mod/pages.php +++ b/inc/mod/pages.php @@ -370,12 +370,12 @@ function mod_edit_board($boardName) { // Clear reports $query = prepare('DELETE FROM ``reports`` WHERE `board` = :id'); - $query->bindValue(':id', $board['uri'], PDO::PARAM_INT); + $query->bindValue(':id', $board['uri'], PDO::PARAM_STR); $query->execute() or error(db_error($query)); // Delete from table $query = prepare('DELETE FROM ``boards`` WHERE `uri` = :uri'); - $query->bindValue(':uri', $board['uri'], PDO::PARAM_INT); + $query->bindValue(':uri', $board['uri'], PDO::PARAM_STR); $query->execute() or error(db_error($query)); $query = prepare("SELECT `board`, `post` FROM ``cites`` WHERE `target_board` = :board ORDER BY `board`");