WordPress.org

Make WordPress Core

Ticket #22209: 22209.diff

File 22209.diff, 724 bytes (added by evansolomon, 9 years ago)
  • wp-includes/class-wp.php

     
    151151                        $req_uri_array = explode('?', $req_uri);
    152152                        $req_uri = $req_uri_array[0];
    153153                        $self = $_SERVER['PHP_SELF'];
    154                         $home_path = parse_url(home_url());
    155                         if ( isset($home_path['path']) )
    156                                 $home_path = $home_path['path'];
    157                         else
    158                                 $home_path = '';
    159                         $home_path = trim($home_path, '/');
     154                        $home_path = trim( parse_url( home_url(), PHP_URL_PATH ), '/' );
    160155
    161156                        // Trim path info from the end and the leading home path from the
    162157                        // front. For path info requests, this leaves us with the requesting