Fix a sometimes notice in wpmu_current_site()

props johnjamesjacoby. see #27003.

git-svn-id: https://develop.svn.wordpress.org/trunk@27275 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2014-02-25 20:52:05 +00:00
parent c5206e3d41
commit 46ee6fbc51
1 changed files with 1 additions and 1 deletions

View File

@ -250,7 +250,7 @@ function wpmu_current_site() {
$networks = $wpdb->get_col( "SELECT id FROM $wpdb->site LIMIT 2" );
if ( count( $networks ) <= 1 ) {
$current_site = wp_get_network( $networks[0]->id );
$current_site = wp_get_network( $networks[0] );
$current_site->blog_id = $wpdb->get_var( $wpdb->prepare( "SELECT blog_id
FROM $wpdb->blogs WHERE domain = %s AND path = %s",