Make WordPress Core


Ignore:
Timestamp:
10/08/2020 09:13:57 PM (4 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/users.php

    r48574 r49108  
    231231
    232232        if ( empty( $_REQUEST['users'] ) ) {
    233             $userids = array( intval( $_REQUEST['user'] ) );
     233            $userids = array( (int) $_REQUEST['user'] );
    234234        } else {
    235235            $userids = array_map( 'intval', (array) $_REQUEST['users'] );
     
    402402
    403403        if ( empty( $_REQUEST['users'] ) ) {
    404             $userids = array( intval( $_REQUEST['user'] ) );
     404            $userids = array( (int) $_REQUEST['user'] );
    405405        } else {
    406406            $userids = $_REQUEST['users'];
Note: See TracChangeset for help on using the changeset viewer.