[ticket/11775] Fix error when moving the last post to another topic

PHPBB3-11775
This commit is contained in:
Joas Schilling 2013-08-08 13:42:51 +02:00
parent acc7cb5e23
commit 91eccc708b

View file

@ -668,10 +668,10 @@ function merge_posts($topic_id, $to_topic_id)
}
// If the topic no longer exist, we will update the topic watch table.
phpbb_update_rows_avoiding_duplicates_notify_status($db, TOPICS_WATCH_TABLE, 'topic_id', $topic_ids, $to_topic_id);
phpbb_update_rows_avoiding_duplicates_notify_status($db, TOPICS_WATCH_TABLE, 'topic_id', array($topic_id), $to_topic_id);
// If the topic no longer exist, we will update the bookmarks table.
phpbb_update_rows_avoiding_duplicates($db, BOOKMARKS_TABLE, 'topic_id', $topic_id, $to_topic_id);
phpbb_update_rows_avoiding_duplicates($db, BOOKMARKS_TABLE, 'topic_id', array($topic_id), $to_topic_id);
}
// Link to the new topic