WordPress.org

Make WordPress Core

Changeset 7905


Ignore:
Timestamp:
05/07/2008 07:57:15 PM (14 years ago)
Author:
ryan
Message:

Fix page 404 when page_for_posts is empty. see #6539

File:
1 edited

Legend:

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

    r7880 r7905  
    924924            }
    925925
    926             if  ( ('page' != get_option('show_on_front') ) || ( $reqpage != get_option('page_for_posts') ) ) {
     926            $page_for_posts = get_option('page_for_posts');
     927            if  ( ('page' != get_option('show_on_front') ) ||  empty($page_for_posts) || ( $reqpage != $page_for_posts ) ) {
    927928                $q['pagename'] = str_replace('%2F', '/', urlencode(urldecode($q['pagename'])));
    928929                $page_paths = '/' . trim($q['pagename'], '/');
Note: See TracChangeset for help on using the changeset viewer.