[ticket/10950] Check $delete_ids to be not empty

PHPBB3-10950
This commit is contained in:
Joas Schilling 2012-07-04 13:14:19 +02:00
parent 5c8c7b1352
commit 338d29072f

View file

@ -1216,6 +1216,8 @@ function phpbb_delete_user_pms($user_id)
WHERE user_id = ' . (int) $user_id;
$db->sql_query($sql);
if (!empty($delete_ids))
{
// Now we have to check which messages we can delete completely
$sql = 'SELECT msg_id
FROM ' . PRIVMSGS_TO_TABLE . '
@ -1242,6 +1244,7 @@ function phpbb_delete_user_pms($user_id)
WHERE ' . $db->sql_in_set('msg_id', $delete_ids);
$db->sql_query($sql);
}
}
// Set the remaining author id to anonymous
// This way users are still able to read messages from users being removed