From d143c7c47e88d09d08b442350d875f0adbe5be92 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 26 Feb 2022 14:34:01 +0000 Subject: [PATCH] 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 --- wp-includes/class-wp.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/class-wp.php b/wp-includes/class-wp.php index 6eb6177c09..9765a01507 100644 --- a/wp-includes/class-wp.php +++ b/wp-includes/class-wp.php @@ -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 ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 4e17590ae1..f97ced49b7 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.