WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/08/2020 09:13:57 PM (14 months 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/tests/phpunit/tests/rest-api/rest-posts-controller.php

    r48952 r49108  
    484484        $this->assertFalse( in_array( $id2, $ids, true ) );
    485485
    486         $request->set_param( 'exclude', "$id2" );
     486        $request->set_param( 'exclude', (string) $id2 );
    487487        $response = rest_get_server()->dispatch( $request );
    488488        $data     = $response->get_data();
Note: See TracChangeset for help on using the changeset viewer.