HTTP API: Prevent a fatal error on PHP < 5.4.7 due to changes introduced in [38449].

Fixes #36356

Built from https://develop.svn.wordpress.org/trunk@38450


git-svn-id: http://core.svn.wordpress.org/trunk@38391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2016-08-30 17:16:30 +00:00
parent 4fd9ad1ce2
commit ebe159a4bc
2 changed files with 5 additions and 3 deletions

View File

@ -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;
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.7-alpha-38449';
$wp_version = '4.7-alpha-38450';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.