Make WordPress Core

Changeset 52805


Ignore:
Timestamp:
02/26/2022 02:32:37 PM (2 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp.php

    r52804 r52805  
    253253            }
    254254
    255             if ( isset( $this->matched_rule ) ) {
     255            if ( ! empty( $this->matched_rule ) ) {
    256256                // Trim the query of everything up to the '?'.
    257257                $query = preg_replace( '!^.+\?!', '', $query );
Note: See TracChangeset for help on using the changeset viewer.