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/tests/phpunit/tests/option/multisite.php

    r48937 r49108  
    121121            // Assert all values of $blog_id that means the current or main blog (the same here).
    122122            $this->assertSame( $value, get_blog_option( $blog_id, $key ) );
    123             $this->assertSame( $value, get_blog_option( "$blog_id", $key ) );
     123            $this->assertSame( $value, get_blog_option( (string) $blog_id, $key ) );
    124124            // $this->assertSame( $value, get_option( $key ) );                // Check get_option().
    125125
Note: See TracChangeset for help on using the changeset viewer.