[ticket/17089] If user warned without post assume 0 for forum/topic_id

PHPBB3-17089
This commit is contained in:
Christian Schnegelberger 2023-01-31 18:56:58 +01:00
parent 458940217b
commit b7258788cc

View file

@ -603,8 +603,8 @@ function add_warning($user_row, $warning, $send_pm = true, $post_id = 0)
$db->sql_freeresult($result);
$phpbb_log->add('mod', $user->data['user_id'], $user->ip, 'LOG_USER_WARNING', false, array(
'forum_id' => $row['forum_id'],
'topic_id' => $row['topic_id'],
'forum_id' => $row['forum_id'] ?? 0,
'topic_id' => $row['topic_id'] ?? 0,
'post_id' => $post_id,
$user_row['username']
));