Multisite: Avoid a PHP Notice when saving a site address without a path.

Props kjbenk.
Fixes #35631.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Jeremy Felt 2016-02-17 20:50:27 +00:00
parent bffdae7b1d
commit e7a7f08c8b
2 changed files with 6 additions and 1 deletions

View File

@ -78,6 +78,11 @@ if ( isset( $_REQUEST['action'] ) && 'update-site' == $_REQUEST['action'] ) {
}
$update_parsed_url = parse_url( $blog_data['url'] );
// If a path is not provided, use the default of `/`.
if ( ! isset( $update_parsed_url['path'] ) ) {
$update_parsed_url['path'] = '/';
}
$blog_data['scheme'] = $update_parsed_url['scheme'];
$blog_data['domain'] = $update_parsed_url['host'];
$blog_data['path'] = $update_parsed_url['path'];

View File

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