Networks and Sites: Check the result of get_site() in wp_insert_site().

Props davidbinda, vanyukov, lukecarbis.
Merges [44799] to the 5.1 branch.
Fixes #46300.
Built from https://develop.svn.wordpress.org/branches/5.1@44800


git-svn-id: http://core.svn.wordpress.org/branches/5.1@44632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-03-05 20:37:50 +00:00
parent 771ec430c0
commit 6d331e9743
2 changed files with 5 additions and 1 deletions

View File

@ -69,6 +69,10 @@ function wp_insert_site( array $data ) {
$new_site = get_site( $wpdb->insert_id );
if ( ! $new_site ) {
return new WP_Error( 'get_site_error', __( 'Could not retrieve site data.' ) );
}
clean_blog_cache( $new_site );
/**

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.1.1-alpha-44798';
$wp_version = '5.1.1-alpha-44800';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.