diff --git a/wp-includes/rest-api.php b/wp-includes/rest-api.php index 7480fd5c64..675c545ce1 100644 --- a/wp-includes/rest-api.php +++ b/wp-includes/rest-api.php @@ -2818,6 +2818,11 @@ function rest_preload_api_request( $memo, $path ) { } } + $path = untrailingslashit( $path ); + if ( empty( $path ) ) { + $path = '/'; + } + $path_parts = parse_url( $path ); if ( false === $path_parts ) { return $memo; diff --git a/wp-includes/version.php b/wp-includes/version.php index 068dffae2e..4e38a362ca 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-51647'; +$wp_version = '5.9-alpha-51648'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.