From da395edbca3e25d1758a6b8c26d14c2e48f112d9 Mon Sep 17 00:00:00 2001 From: rxu Date: Mon, 12 Mar 2012 01:47:28 +0800 Subject: [PATCH] [ticket/10684] Remove intval mapping for array keys PHP manual for arrays http://php.net/manual/en/language.types.array.php states that the following key cast will occur: Strings containing valid integers will be cast to the integer type. E.g. the key "8" will actually be stored under 8. Thus, no intval mapping for numeric array keys is needed. PHPBB3-10684 --- phpBB/includes/functions_privmsgs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index 8303fc3754..4ea8f74153 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -1635,7 +1635,7 @@ function pm_notification($mode, $author, $recipients, $subject, $message, $msg_i include($phpbb_root_path . 'includes/functions_user.' . $phpEx); } $banned_users = phpbb_get_banned_users_ids(array_keys($recipients)); - $recipients = array_diff(array_map('intval', array_keys($recipients)), $banned_users); + $recipients = array_diff(array_keys($recipients), $banned_users); if (!sizeof($recipients)) {