Make WordPress Core

Changeset 44800


Ignore:
Timestamp:
03/05/2019 08:36:28 PM (8 years ago)
Author:
SergeyBiryukov
Message:

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.

Location:
branches/5.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.1

  • branches/5.1/src/wp-includes/ms-site.php

    r44727 r44800  
    6969
    7070        $new_site = get_site( $wpdb->insert_id );
     71
     72        if ( ! $new_site ) {
     73                return new WP_Error( 'get_site_error', __( 'Could not retrieve site data.' ) );
     74        }
    7175
    7276        clean_blog_cache( $new_site );
Note: See TracChangeset for help on using the changeset viewer.