mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 19:46:21 +00:00
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:
parent
bffdae7b1d
commit
e7a7f08c8b
@ -78,6 +78,11 @@ if ( isset( $_REQUEST['action'] ) && 'update-site' == $_REQUEST['action'] ) {
|
|||||||
}
|
}
|
||||||
$update_parsed_url = parse_url( $blog_data['url'] );
|
$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['scheme'] = $update_parsed_url['scheme'];
|
||||||
$blog_data['domain'] = $update_parsed_url['host'];
|
$blog_data['domain'] = $update_parsed_url['host'];
|
||||||
$blog_data['path'] = $update_parsed_url['path'];
|
$blog_data['path'] = $update_parsed_url['path'];
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user