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
This commit is contained in:
Sergey Biryukov 2014-06-27 00:25:15 +00:00
parent aebf8f0fea
commit 4d9286ad21

View File

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