Skip to content

Commit e198e92

Browse files
committed
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
1 parent 479596a commit e198e92

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/wp-admin/network/site-info.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@
7878
}
7979
$update_parsed_url = parse_url( $blog_data['url'] );
8080

81+
// If a path is not provided, use the default of `/`.
82+
if ( ! isset( $update_parsed_url['path'] ) ) {
83+
$update_parsed_url['path'] = '/';
84+
}
85+
8186
$blog_data['scheme'] = $update_parsed_url['scheme'];
8287
$blog_data['domain'] = $update_parsed_url['host'];
8388
$blog_data['path'] = $update_parsed_url['path'];

0 commit comments

Comments
 (0)