WordPress.org

Make WordPress Core

Ticket #6539: query-404.diff

File query-404.diff, 597 bytes (added by natecook, 10 years ago)

Patch for fix

  • query.php

     
    919919                                        $reqpage = 0;
    920920                        }
    921921
    922                         if  ( ('page' != get_option('show_on_front') ) || ( $reqpage != get_option('page_for_posts') ) ) {
     922                        if  ( ('page' != get_option('show_on_front') ) || ( $reqpage !== get_option('page_for_posts') ) ) {
    923923                                $q['pagename'] = str_replace('%2F', '/', urlencode(urldecode($q['pagename'])));
    924924                                $page_paths = '/' . trim($q['pagename'], '/');
    925925                                $q['pagename'] = sanitize_title(basename($page_paths));