1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-05 07:07:51 +02:00

[ticket/10950] Move array initialisation to the front.

PHPBB3-10950
This commit is contained in:
Andreas Fischer 2012-06-23 10:32:16 +02:00
parent 2a76b7e869
commit a50d1a3576

View File

@ -1103,13 +1103,14 @@ function phpbb_delete_user_pms($user_id)
// Get PM Information for later deleting
// The two queries where split, so we can use our indexes
$undelivered_msg = $undelivered_user = $delete_ids = array();
// Part 1: get PMs the user received
$sql = 'SELECT msg_id, author_id, folder_id, pm_unread, pm_new
FROM ' . PRIVMSGS_TO_TABLE . '
WHERE user_id = ' . $user_id;
$result = $db->sql_query($sql);
$undelivered_msg = $undelivered_user = $delete_ids = array();
while ($row = $db->sql_fetchrow($result))
{
if ($row['author_id'] == $user_id && $row['folder_id'] == PRIVMSGS_NO_BOX)