diff --git a/wp-includes/ms-site.php b/wp-includes/ms-site.php index 60d1f29035..ddc71380b3 100644 --- a/wp-includes/ms-site.php +++ b/wp-includes/ms-site.php @@ -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 ); /** diff --git a/wp-includes/version.php b/wp-includes/version.php index 14c2eea494..24f10864ea 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.