mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-12 01:50:48 +01:00
Fix capcodes in PHP7.2. Close #299
This commit is contained in:
parent
41cfd500de
commit
ac971f36d5
@ -1074,7 +1074,7 @@ 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 {
|
||||||
$query->bindValue(':capcode', null, PDO::PARAM_NULL);
|
$query->bindValue(':capcode', null, PDO::PARAM_NULL);
|
||||||
}
|
}
|
||||||
|
@ -212,8 +212,8 @@ function check_login($prompt = false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$mod = array(
|
$mod = array(
|
||||||
'id' => $user['id'],
|
'id' => (int)$user['id'],
|
||||||
'type' => $user['type'],
|
'type' => (int)$user['type'],
|
||||||
'username' => $cookie[0],
|
'username' => $cookie[0],
|
||||||
'boards' => explode(',', $user['boards'])
|
'boards' => explode(',', $user['boards'])
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user