From 6d574d7cabfaf6cc9797d2119ba1a10d9cd78fa3 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 17 Aug 2021 00:27:38 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@51627 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/functions/doEnclose.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/tests/functions/doEnclose.php b/tests/phpunit/tests/functions/doEnclose.php index 30a8e73dac..5c8a42089f 100644 --- a/tests/phpunit/tests/functions/doEnclose.php +++ b/tests/phpunit/tests/functions/doEnclose.php @@ -280,7 +280,7 @@ class Tests_Functions_DoEnclose extends WP_UnitTestCase { $path = parse_url( $url, PHP_URL_PATH ); - if ( null !== $path ) { + if ( is_string( $path ) ) { $extension = pathinfo( $path, PATHINFO_EXTENSION ); if ( isset( $fake_headers[ $extension ] ) ) { return $fake_headers[ $extension ];