Query: Correct the "matched rule" condition in `WP::parse_request()`.

The `WP::$matched_rule` property is always set now, so we should check that it's not empty instead.

Follow-up to [52804].

See #55222.
Built from https://develop.svn.wordpress.org/trunk@52805


git-svn-id: http://core.svn.wordpress.org/trunk@52394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2022-02-26 14:34:01 +00:00
parent a47961e80e
commit d143c7c47e
2 changed files with 2 additions and 2 deletions

View File

@ -252,7 +252,7 @@ class WP {
}
}
if ( isset( $this->matched_rule ) ) {
if ( ! empty( $this->matched_rule ) ) {
// Trim the query of everything up to the '?'.
$query = preg_replace( '!^.+\?!', '', $query );

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.0-alpha-52804';
$wp_version = '6.0-alpha-52805';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.