summaryrefslogtreecommitdiffstats
path: root/wp-includes/class-wp-network.php
diff options
context:
space:
mode:
Diffstat (limited to 'wp-includes/class-wp-network.php')
-rw-r--r--wp-includes/class-wp-network.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/wp-includes/class-wp-network.php b/wp-includes/class-wp-network.php
index d33f210..d835765 100644
--- a/wp-includes/class-wp-network.php
+++ b/wp-includes/class-wp-network.php
@@ -307,8 +307,8 @@ class WP_Network {
if ( ! empty( $this->cookie_domain ) ) {
return;
}
-
- $this->cookie_domain = $this->domain;
+ $domain = parse_url( $this->domain, PHP_URL_HOST );
+ $this->cookie_domain = is_string( $domain ) ? $domain : $this->domain;
if ( str_starts_with( $this->cookie_domain, 'www.' ) ) {
$this->cookie_domain = substr( $this->cookie_domain, 4 );
}