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/term/wpDeleteTerm.php

    r48937 r49108  
    3030        wp_delete_term( $terms[0], 'wptests_tax' );
    3131        $this->assertSame( 1, $this->deleted_term->count );
    32         $this->assertSame( $this->object_ids, array( "$post_id" ) );
     32        $this->assertSame( $this->object_ids, array( (string) $post_id ) );
    3333
    3434        wp_delete_term( $terms[1], 'wptests_tax' );
Note: See TracChangeset for help on using the changeset viewer.