diff --git a/wp-includes/class-wp-network.php b/wp-includes/class-wp-network.php index d33f210dab..d835765c6b 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 ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 51a04087a3..7357831199 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.6-alpha-58137'; +$wp_version = '6.6-alpha-58138'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.