diff --git a/wp-includes/ms-default-constants.php b/wp-includes/ms-default-constants.php index 75ea1e6e7..49746ef04 100644 --- a/wp-includes/ms-default-constants.php +++ b/wp-includes/ms-default-constants.php @@ -61,8 +61,12 @@ function ms_cookie_constants( ) { /** * @since 2.0.0 */ - if ( !defined('COOKIE_DOMAIN') ) - define('COOKIE_DOMAIN', '.' . $current_site->cookie_domain); + if ( !defined('COOKIE_DOMAIN') ) { + if ( isset( $current_site->cookie_domain ) ) + define('COOKIE_DOMAIN', '.' . $current_site->cookie_domain); + else + define('COOKIE_DOMAIN', '.' . $current_site->domain); + } } /** @@ -85,4 +89,4 @@ function ms_file_constants( ) { if ( !defined( 'WPMU_ACCEL_REDIRECT' ) ) define( 'WPMU_ACCEL_REDIRECT', false ); } -?> \ No newline at end of file +?>