diff --git a/wp-includes/ms-default-constants.php b/wp-includes/ms-default-constants.php index 7d794e32e6..016ed437b7 100644 --- a/wp-includes/ms-default-constants.php +++ b/wp-includes/ms-default-constants.php @@ -68,7 +68,8 @@ function ms_cookie_constants() { * @since 2.6.0 */ if ( ! defined( 'ADMIN_COOKIE_PATH' ) ) { - if ( ! is_subdomain_install() || trim( parse_url( get_option( 'siteurl' ), PHP_URL_PATH ), '/' ) ) { + $site_path = parse_url( get_option( 'siteurl' ), PHP_URL_PATH ); + if ( ! is_subdomain_install() || is_string( $site_path ) && trim( $site_path, '/' ) ) { define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH ); } else { define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . 'wp-admin' ); diff --git a/wp-includes/version.php b/wp-includes/version.php index d8b5addf4d..f775a98ac4 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-51629'; +$wp_version = '5.9-alpha-51630'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.