Make WordPress Core


Ignore:
Timestamp:
10/06/2025 11:29:14 AM (12 months ago)
Author:
swissspidy
Message:

Code Modernization: Fix instances of using null as an array offset.

Addresses a new ​deprecation in PHP 8.5 in several block-related registry classes.

Follow-up to [60809].

Props mukesh27, swissspidy.
Fixes #63957.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/block-bindings/wpBlockBindingsRegistry.php

    r59080 r60904  
    345345                $this->assertTrue( $result );
    346346        }
     347
     348        /**
     349         * Should return false when checking registration with a null source name.
     350         *
     351         * @ticket 63957
     352         *
     353         * @covers WP_Block_Bindings_Registry::is_registered
     354         */
     355        public function test_is_registered_with_null_source_name() {
     356                $result = $this->registry->is_registered( null );
     357                $this->assertFalse( $result );
     358        }
    347359}
Note: See TracChangeset for help on using the changeset viewer.