aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2012-03-27 01:35:01 +0200
committerAndreas Fischer <bantu@phpbb.com>2012-03-27 01:35:01 +0200
commit9040f18d7cf9de137acbac6072dc2ffd3cede1b5 (patch)
tree5216f3ebfe7375b589575229d04e429a2cddd37e /phpBB
parentdbc7a69ad2bf6b062a4d7a40d62be29a410b5c18 (diff)
downloadforums-9040f18d7cf9de137acbac6072dc2ffd3cede1b5.tar
forums-9040f18d7cf9de137acbac6072dc2ffd3cede1b5.tar.gz
forums-9040f18d7cf9de137acbac6072dc2ffd3cede1b5.tar.bz2
forums-9040f18d7cf9de137acbac6072dc2ffd3cede1b5.tar.xz
forums-9040f18d7cf9de137acbac6072dc2ffd3cede1b5.zip
[ticket/10605] Remove unnecessary array_keys calls on $delete_rows.
PHPBB3-10605
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/functions_privmsgs.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
index 4ff0c53420..00029a1986 100644
--- a/phpBB/includes/functions_privmsgs.php
+++ b/phpBB/includes/functions_privmsgs.php
@@ -1123,7 +1123,7 @@ function phpbb_delete_user_pms($user_id)
}
}
- $delete_rows[$row['msg_id']] = true;
+ $delete_rows[(int) $row['msg_id']] = (int) $row['msg_id'];
}
$db->sql_freeresult($result);
@@ -1154,13 +1154,13 @@ function phpbb_delete_user_pms($user_id)
// Delete private message data
$sql = 'DELETE FROM ' . PRIVMSGS_TO_TABLE . "
WHERE user_id = $user_id
- AND " . $db->sql_in_set('msg_id', array_keys($delete_rows));
+ AND " . $db->sql_in_set('msg_id', $delete_rows);
$db->sql_query($sql);
// Now we have to check which messages we can delete completely
$sql = 'SELECT msg_id
FROM ' . PRIVMSGS_TO_TABLE . '
- WHERE ' . $db->sql_in_set('msg_id', array_keys($delete_rows));
+ WHERE ' . $db->sql_in_set('msg_id', $delete_rows);
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))