summaryrefslogtreecommitdiff
path: root/post.php
diff options
context:
space:
mode:
Diffstat (limited to 'post.php')
-rw-r--r--post.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/post.php b/post.php
index 224a2ebd..c76f1f78 100644
--- a/post.php
+++ b/post.php
@@ -561,13 +561,15 @@
$id = post($post, $OP);
- foreach($post['tracked_cites'] as $cite) {
- $query = prepare('INSERT INTO `cites` VALUES (:board, :post, :target_board, :target)');
- $query->bindValue(':board', $board['uri']);
- $query->bindValue(':post', $id, PDO::PARAM_INT);
- $query->bindValue(':target_board',$cite[0]);
- $query->bindValue(':target', $cite[1], PDO::PARAM_INT);
- $query->execute() or error(db_error($query));
+ if(isset($post['tracked_cites'])) {
+ foreach($post['tracked_cites'] as $cite) {
+ $query = prepare('INSERT INTO `cites` VALUES (:board, :post, :target_board, :target)');
+ $query->bindValue(':board', $board['uri']);
+ $query->bindValue(':post', $id, PDO::PARAM_INT);
+ $query->bindValue(':target_board',$cite[0]);
+ $query->bindValue(':target', $cite[1], PDO::PARAM_INT);
+ $query->execute() or error(db_error($query));
+ }
}
buildThread(($OP?$id:$post['thread']));