1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 20:13:22 +01:00

[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
This commit is contained in:
rxu 2012-03-12 01:47:28 +08:00
parent 321d0d9b56
commit da395edbca

View File

@ -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))
{