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:
parent
5e3ae17d61
commit
41ef077491
|
@ -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 );
|
||||
|
||||
/**
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue