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

Props davidbinda, vanyukov, lukecarbis.
Fixes #46300.
Built from https://develop.svn.wordpress.org/trunk@44799


git-svn-id: http://core.svn.wordpress.org/trunk@44631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-03-05 20:35:52 +00:00
parent 5e3ae17d61
commit 41ef077491
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.2-alpha-44797';
$wp_version = '5.2-alpha-44799';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.