mirror of
git://develop.git.wordpress.org/
synced 2025-01-17 12:58:25 +01:00
Fix page 404 when page_for_posts is empty. fixes #6539
git-svn-id: https://develop.svn.wordpress.org/branches/2.5@8099 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
49f258fcfe
commit
933ce58a2e
@ -920,7 +920,8 @@ class WP_Query {
|
||||
$reqpage = 0;
|
||||
}
|
||||
|
||||
if ( ('page' != get_option('show_on_front') ) || ( $reqpage != get_option('page_for_posts') ) ) {
|
||||
$page_for_posts = get_option('page_for_posts');
|
||||
if ( ('page' != get_option('show_on_front') ) || empty($page_for_posts) || ( $reqpage != $page_for_posts ) ) {
|
||||
$q['pagename'] = str_replace('%2F', '/', urlencode(urldecode($q['pagename'])));
|
||||
$page_paths = '/' . trim($q['pagename'], '/');
|
||||
$q['pagename'] = sanitize_title(basename($page_paths));
|
||||
|
Loading…
x
Reference in New Issue
Block a user