bugfix: PHP notices on raw posts

This commit is contained in:
Savetheinternet 2011-12-13 20:15:46 +11:00
parent 250d06074d
commit 75f7ebd49b

View File

@ -561,6 +561,7 @@
$id = post($post, $OP); $id = post($post, $OP);
if(isset($post['tracked_cites'])) {
foreach($post['tracked_cites'] as $cite) { foreach($post['tracked_cites'] as $cite) {
$query = prepare('INSERT INTO `cites` VALUES (:board, :post, :target_board, :target)'); $query = prepare('INSERT INTO `cites` VALUES (:board, :post, :target_board, :target)');
$query->bindValue(':board', $board['uri']); $query->bindValue(':board', $board['uri']);
@ -569,6 +570,7 @@
$query->bindValue(':target', $cite[1], PDO::PARAM_INT); $query->bindValue(':target', $cite[1], PDO::PARAM_INT);
$query->execute() or error(db_error($query)); $query->execute() or error(db_error($query));
} }
}
buildThread(($OP?$id:$post['thread'])); buildThread(($OP?$id:$post['thread']));