HTTP API: Prevent a fatal error on PHP < 5.4.7 due to changes introduced in [38449].
Fixes #36356 git-svn-id: https://develop.svn.wordpress.org/trunk@38450 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
48f389015e
commit
ba5803c16e
@ -659,8 +659,10 @@ function wp_parse_url( $url, $component = -1 ) {
|
||||
if ( ! $parts = @parse_url( 'placeholder://placeholder' . $url, $component ) ) {
|
||||
return $parts;
|
||||
}
|
||||
// Remove the placeholder values
|
||||
unset( $parts['scheme'], $parts['host'] );
|
||||
if ( is_array( $parts ) ) {
|
||||
// Remove the placeholder values
|
||||
unset( $parts['scheme'], $parts['host'] );
|
||||
}
|
||||
} else {
|
||||
return $parts;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user