mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-23 23:20:57 +01:00
Fix reports under PHP7.2
You'll need to delete all reports made before applying this patch for it to work right. However, all reports made after applying this patch will appear correctly in `mod.php?/reports`. This closes #300.
This commit is contained in:
parent
524d48110b
commit
be2eafd4fc
2
post.php
2
post.php
@ -332,7 +332,7 @@ if (isset($_POST['delete'])) {
|
|||||||
$query = prepare("INSERT INTO ``reports`` VALUES (NULL, :time, :ip, :board, :post, :reason)");
|
$query = prepare("INSERT INTO ``reports`` VALUES (NULL, :time, :ip, :board, :post, :reason)");
|
||||||
$query->bindValue(':time', time(), PDO::PARAM_INT);
|
$query->bindValue(':time', time(), PDO::PARAM_INT);
|
||||||
$query->bindValue(':ip', $_SERVER['REMOTE_ADDR'], PDO::PARAM_STR);
|
$query->bindValue(':ip', $_SERVER['REMOTE_ADDR'], PDO::PARAM_STR);
|
||||||
$query->bindValue(':board', $board['uri'], PDO::PARAM_INT);
|
$query->bindValue(':board', $board['uri'], PDO::PARAM_STR);
|
||||||
$query->bindValue(':post', $id, PDO::PARAM_INT);
|
$query->bindValue(':post', $id, PDO::PARAM_INT);
|
||||||
$query->bindValue(':reason', $reason, PDO::PARAM_STR);
|
$query->bindValue(':reason', $reason, PDO::PARAM_STR);
|
||||||
$query->execute() or error(db_error($query));
|
$query->execute() or error(db_error($query));
|
||||||
|
Loading…
Reference in New Issue
Block a user