Ticket #17450: 17450.diff
File 17450.diff, 975 bytes (added by , 13 years ago) |
---|
-
wp-includes/class-wp.php
138 138 $error = '404'; 139 139 $this->did_permalink = true; 140 140 141 if ( isset($_SERVER['PATH_INFO']) ) 141 $pathinfo = ''; 142 if ( isset( $_SERVER['PATH_INFO'] ) ) { 142 143 $pathinfo = $_SERVER['PATH_INFO']; 143 else 144 $pathinfo = ''; 145 $pathinfo_array = explode('?', $pathinfo); 146 $pathinfo = str_replace("%", "%25", $pathinfo_array[0]); 144 $pathinfo_array = explode('?', $pathinfo); 145 $pathinfo = $pathinfo_array[0]; 146 // PATH_INFO is url-decoded, we need to encode it to match REQUEST_URI 147 $pathinfo = strtolower( urlencode( $pathinfo ) ); 148 $pathinfo = str_replace( '%2f', '/', $pathinfo ); // but not slashes 149 } 150 147 151 $req_uri = $_SERVER['REQUEST_URI']; 148 152 $req_uri_array = explode('?', $req_uri); 149 153 $req_uri = $req_uri_array[0];