Avoid a notice in is_main_network() when called in single site. see #25030.

Built from https://develop.svn.wordpress.org/trunk@25827


git-svn-id: http://core.svn.wordpress.org/trunk@25827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2013-10-24 22:53:31 +00:00
parent c8c2c8d2a2
commit deadb7b296
1 changed files with 2 additions and 2 deletions

View File

@ -3349,11 +3349,11 @@ function is_main_site( $site_id = null ) {
function is_main_network( $network_id = null ) {
global $current_site, $wpdb;
$current_network_id = (int) $current_site->id;
if ( ! is_multisite() )
return true;
$current_network_id = (int) $current_site->id;
if ( ! $network_id )
$network_id = $current_network_id;
$network_id = (int) $network_id;