Make WordPress Core

Changeset 51627


Ignore:
Timestamp:
08/17/2021 12:27:38 AM (3 years ago)
Author:
SergeyBiryukov
Message:

Tests: Use a better return type check for parse_url() in do_enclose() tests.

Since the pathinfo() function accepts a string, checking for that specifically is more consistent with similar checks elsewhere in core.

Follow-up to [51606], [51622], [51626].

See #53635.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/functions/doEnclose.php

    r51606 r51627  
    281281        $path = parse_url( $url, PHP_URL_PATH );
    282282
    283         if ( null !== $path ) {
     283        if ( is_string( $path ) ) {
    284284            $extension = pathinfo( $path, PATHINFO_EXTENSION );
    285285            if ( isset( $fake_headers[ $extension ] ) ) {
Note: See TracChangeset for help on using the changeset viewer.