pages.php: mod_merge cast post id

This commit is contained in:
Zankaria 2024-11-26 00:16:27 +01:00
parent e80160f18c
commit 5ee20431e2

View file

@ -1655,7 +1655,7 @@ function mod_merge(Context $ctx, $originBoard, $postID) {
error($config['error']['noaccess']);
$query = prepare(sprintf('SELECT * FROM ``posts_%s`` WHERE `id` = :id AND `thread` IS NULL', $originBoard));
$query->bindValue(':id', $postID);
$query->bindValue(':id', (int)$postID, \PDO::PARAM_INT);
$query->execute() or error(db_error($query));
if (!$post = $query->fetch(PDO::FETCH_ASSOC)) {
error($config['error']['404']);