mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-13 05:10:18 +00:00
General: Replace older-style PHP type conversion functions with type casts.
This improves performance, readability, and consistency throughout core. * `intval()` → `(int)` * `strval()` → `(string)` * `floatval()` → `(float)` Props ayeshrajans. Fixes #42918. git-svn-id: https://develop.svn.wordpress.org/trunk@49108 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -230,7 +230,7 @@ switch ( $wp_list_table->current_action() ) {
|
||||
}
|
||||
|
||||
if ( empty( $_REQUEST['users'] ) ) {
|
||||
$userids = array( intval( $_REQUEST['user'] ) );
|
||||
$userids = array( (int) $_REQUEST['user'] );
|
||||
} else {
|
||||
$userids = array_map( 'intval', (array) $_REQUEST['users'] );
|
||||
}
|
||||
@@ -401,7 +401,7 @@ switch ( $wp_list_table->current_action() ) {
|
||||
}
|
||||
|
||||
if ( empty( $_REQUEST['users'] ) ) {
|
||||
$userids = array( intval( $_REQUEST['user'] ) );
|
||||
$userids = array( (int) $_REQUEST['user'] );
|
||||
} else {
|
||||
$userids = $_REQUEST['users'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user