Change capcode binding from int to string, needed for newer PHP support

This commit is contained in:
Benjamin Southall 2019-02-26 11:01:19 +10:00
parent e62f8912fc
commit 2bb2a6d3d7

View file

@ -1045,10 +1045,10 @@ function post(array $post) {
} }
if ($post['mod'] && isset($post['capcode']) && $post['capcode']) { if ($post['mod'] && isset($post['capcode']) && $post['capcode']) {
$query->bindValue(':capcode', $post['capcode'], PDO::PARAM_INT); $query->bindValue(':capcode', $post['capcode'], PDO::PARAM_STR);
} else { } else {
if ($config['joke_capcode'] && isset($post['capcode']) && $post['capcode'] === 'joke') { if ($config['joke_capcode'] && isset($post['capcode']) && $post['capcode'] === 'joke') {
$query->bindValue(':capcode', $post['capcode'], PDO::PARAM_INT); $query->bindValue(':capcode', $post['capcode'], PDO::PARAM_STR);
} }
else { else {
$query->bindValue(':capcode', null, PDO::PARAM_NULL); $query->bindValue(':capcode', null, PDO::PARAM_NULL);