- Code: Select all
$forum_id_ary = array_unique($forum_id_ary);
$topic_id_ary = array_unique(array_merge($topic_id_ary, $new_topic_id_ary));
if (sizeof($topic_id_ary))
{
sync('reported', 'topic_id', $topic_id_ary);
sync('topic', 'topic_id', $topic_id_ary);
}
The problem here: sync() works on the topic IDs in the array values, but here the topic IDs are in the keys. The forum ID sync is fine, AFAIK.
Simply add an array_keys to $topic_id_ary