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

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