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

git-svn-id: https://develop.svn.wordpress.org/trunk@25827 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2013-10-17 05:16:41 +00:00
parent 5de9864891
commit 3c067c1ec2
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;