From ebe159a4bcb1706bc900066f895bd2a4cca50d11 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Tue, 30 Aug 2016 17:16:30 +0000 Subject: [PATCH] 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 --- wp-includes/http.php | 6 ++++-- wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/wp-includes/http.php b/wp-includes/http.php index fe7c841325..c1dd390c82 100644 --- a/wp-includes/http.php +++ b/wp-includes/http.php @@ -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; } diff --git a/wp-includes/version.php b/wp-includes/version.php index d2771a2379..64cca2d273 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.