Skip to content
Permalink
Browse files

Networks and Sites: Check the result of `get_site()` in `wp_insert_si…

…te()`.

Props davidbinda, vanyukov, lukecarbis.
Merges [44799] to the 5.1 branch.
Fixes #46300.

git-svn-id: https://develop.svn.wordpress.org/branches/5.1@44800 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information...
SergeyBiryukov committed Mar 5, 2019
1 parent 0b63929 commit b57deec916e2c02553d93e663a3711a41008e18d
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/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 );
/**

0 comments on commit b57deec

Please sign in to comment.
You can’t perform that action at this time.