Make WordPress Core

Ticket #16002: 16002.2.diff

File 16002.2.diff, 761 bytes (added by ryan, 14 years ago)
  • wp-includes/query.php

     
    15591559                // Correct is_* for page_on_front and page_for_posts
    15601560                if ( $this->is_home && 'page' == get_option('show_on_front') && get_option('page_on_front') ) {
    15611561                        $_query = wp_parse_args($query);
     1562                        // pagename can be set and empty depending on matched rewrite rules. Ignore an empty pagename.
     1563                        if ( isset($_query['pagename']) && '' == $_query['pagename'] )
     1564                                unset($_query['pagename']);
    15621565                        if ( empty($_query) || !array_diff( array_keys($_query), array('preview', 'page', 'paged', 'cpage') ) ) {
    15631566                                $this->is_page = true;
    15641567                                $this->is_home = false;