In insert_blog(), make sure we retrieve the insertion ID from wpdb before calling a function that could invoke queries. props feedmeastraycat. fixes #23400.

git-svn-id: http://core.svn.wordpress.org/trunk@23511 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2013-02-28 16:53:48 +00:00
parent 699262666b
commit 8fe09a809c
1 changed files with 3 additions and 2 deletions

View File

@ -1104,8 +1104,9 @@ function insert_blog($domain, $path, $site_id) {
if ( ! $result )
return false;
refresh_blog_details($wpdb->insert_id);
return $wpdb->insert_id;
$blog_id = $wpdb->insert_id;
refresh_blog_details( $blog_id );
return $blog_id;
}
/**