mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-02 23:07:39 +02:00
[ticket/10950] Check $delete_ids to be not empty
PHPBB3-10950
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user