Make WordPress Core


Ignore:
Timestamp:
12/28/2010 10:34:15 PM (14 years ago)
Author:
ryan
Message:

Ignore an empty pagename when correcting is_* for page_on_front requests. Props donalmacarthur, SergeyBiryukov, filosofo. fixes #16002

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/query.php

    r17147 r17162  
    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;
Note: See TracChangeset for help on using the changeset viewer.