[ticket/12912] Undefined index when adding logs from extensions

Add isset() to forum_id and topic_id.

PHPBB3-12912