Avoid a PHP notice and warning on language selection screen.

props meekyhwang.
fixes #28648.

git-svn-id: https://develop.svn.wordpress.org/trunk@28865 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2014-06-27 00:24:36 +00:00
parent f68d096c31
commit b864d0955e

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