mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-01-18 17:14:04 +01:00
bugfix: PHP notices on raw posts
This commit is contained in:
parent
7409da1a9d
commit
684fb68bf9
16
post.php
16
post.php
@ -561,13 +561,15 @@
|
|||||||
|
|
||||||
$id = post($post, $OP);
|
$id = post($post, $OP);
|
||||||
|
|
||||||
foreach($post['tracked_cites'] as $cite) {
|
if(isset($post['tracked_cites'])) {
|
||||||
$query = prepare('INSERT INTO `cites` VALUES (:board, :post, :target_board, :target)');
|
foreach($post['tracked_cites'] as $cite) {
|
||||||
$query->bindValue(':board', $board['uri']);
|
$query = prepare('INSERT INTO `cites` VALUES (:board, :post, :target_board, :target)');
|
||||||
$query->bindValue(':post', $id, PDO::PARAM_INT);
|
$query->bindValue(':board', $board['uri']);
|
||||||
$query->bindValue(':target_board',$cite[0]);
|
$query->bindValue(':post', $id, PDO::PARAM_INT);
|
||||||
$query->bindValue(':target', $cite[1], PDO::PARAM_INT);
|
$query->bindValue(':target_board',$cite[0]);
|
||||||
$query->execute() or error(db_error($query));
|
$query->bindValue(':target', $cite[1], PDO::PARAM_INT);
|
||||||
|
$query->execute() or error(db_error($query));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
buildThread(($OP?$id:$post['thread']));
|
buildThread(($OP?$id:$post['thread']));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user