From 4d9286ad21a42fd39a520509d6c4dd3174835e39 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 27 Jun 2014 00:25:15 +0000 Subject: [PATCH] Avoid a PHP notice and warning on language selection screen. props meekyhwang. fixes #28648. Built from https://develop.svn.wordpress.org/trunk@28865 git-svn-id: http://core.svn.wordpress.org/trunk@28665 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-http.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wp-includes/class-http.php b/wp-includes/class-http.php index 41cfe840d6..1f0420a934 100644 --- a/wp-includes/class-http.php +++ b/wp-includes/class-http.php @@ -183,7 +183,11 @@ class WP_Http { // Determine if this request is to OUR install of WordPress $homeURL = parse_url( get_bloginfo( 'url' ) ); - $r['local'] = $homeURL['host'] == $arrURL['host'] || 'localhost' == $arrURL['host']; + if ( isset( $homeURL['host'] ) ) { + $r['local'] = ( $homeURL['host'] == $arrURL['host'] || 'localhost' == $arrURL['host'] ); + } else { + $r['local'] = false; + } unset( $homeURL ); // If we are streaming to a file but no filename was given drop it in the WP temp dir