Make WordPress Core


Ignore:
Timestamp:
07/15/2019 06:24:08 AM (7 years ago)
Author:
pento
Message:

Code Modernisation: Fix known instances of array access on data types that can't be accessed as arrays.

PHP 7.4 addes a warning when trying access a null/bool/int/float/resource (everything but array, string and object) as if it were an array.

This change fixes all of these warnings visible in unit tests.

Props jrf.
See #47704.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/term/termExists.php

    r43571 r45639  
    151151                _unregister_taxonomy( 'foo' );
    152152
    153                 $this->assertSame( null, $found['term_id'] );
     153                $this->assertSame( null, $found );
    154154        }
    155155
Note: See TracChangeset for help on using the changeset viewer.