From 3a9ed90c585b0e97cbc3453f5a004c34e630cf00 Mon Sep 17 00:00:00 2001 From: Macil Tech Date: Wed, 28 Nov 2012 20:08:53 -0700 Subject: [PATCH] Incorrect parameter type. The parameter was bound with the wrong type. I guess the type isn't enforced judging by how the code still seemed to work, but it probably should be fixed. --- inc/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/functions.php b/inc/functions.php index 3de1ccaf..8ce81e25 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -527,7 +527,7 @@ function checkFlood($post) { $query = prepare(sprintf("SELECT * FROM `posts_%s` WHERE (`ip` = :ip AND `time` >= :floodtime) OR (`ip` = :ip AND `body` != '' AND `body` = :body AND `time` >= :floodsameiptime) OR (`body` != '' AND `body` = :body AND `time` >= :floodsametime) LIMIT 1", $board['uri'])); $query->bindValue(':ip', $_SERVER['REMOTE_ADDR']); - $query->bindValue(':body', $post['body'], PDO::PARAM_INT); + $query->bindValue(':body', $post['body']); $query->bindValue(':floodtime', time()-$config['flood_time'], PDO::PARAM_INT); $query->bindValue(':floodsameiptime', time()-$config['flood_time_ip'], PDO::PARAM_INT); $query->bindValue(':floodsametime', time()-$config['flood_time_same'], PDO::PARAM_INT);