WordPress.org

Make WordPress Core

Ticket #17177: request.patch

File request.patch, 482 bytes (added by dnljms, 3 years ago)

Fixes the check for when $req_uri is empty, but a match is still possible.

  • wp-includes/class-wp.php

     
    185185 
    186186                        // Look for matches. 
    187187                        $request_match = $request; 
    188                         if ( empty( $req_uri ) ) { 
     188                        if ( empty( $req_uri ) && empty( $req_match ) ) { 
    189189                                // An empty request could only match against ^$ regex 
    190190                                if ( isset( $rewrite['$'] ) ) { 
    191191                                        $this->matched_rule = '$';