From e7a7f08c8be5f3a932dc7b729050772d3833fbbd Mon Sep 17 00:00:00 2001 From: Jeremy Felt Date: Wed, 17 Feb 2016 20:50:27 +0000 Subject: [PATCH] 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 --- wp-admin/network/site-info.php | 5 +++++ wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/wp-admin/network/site-info.php b/wp-admin/network/site-info.php index 50f287de20..c8874a77cd 100644 --- a/wp-admin/network/site-info.php +++ b/wp-admin/network/site-info.php @@ -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']; diff --git a/wp-includes/version.php b/wp-includes/version.php index cfb706adf3..ef85c356ce 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.