My extension adds a moderator log entry when a moderator makes a change. Since my extension does not rely on a forum_id or topic_id, an error is thrown for undefined indexes (see screenshot). Here's the relevant section:
$forum_id = (int) $additional_data['forum_id'];
$topic_id = (int) $additional_data['topic_id'];
We should probably check if these are set using isset() and then setting them to 0 if not.