Multisite: Avoid a PHP Notice when saving a site address without a path.
Props kjbenk. Fixes #35631. git-svn-id: https://develop.svn.wordpress.org/trunk@36561 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
479596acda
commit
e198e92dff
@ -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'];
|
||||
|
Loading…
Reference in New Issue
Block a user