mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-30 23:30:05 +00:00
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
This commit is contained in:
@@ -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 ];
|
||||
|
||||
Reference in New Issue
Block a user