Explicit ID check so we don't fall through for empties. Props natecook. fixes #6539 for 2.6
git-svn-id: http://svn.automattic.com/wordpress/trunk@7605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f83ca8ec0d
commit
81d1b488a9
|
@ -920,7 +920,7 @@ class WP_Query {
|
||||||
$reqpage = 0;
|
$reqpage = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ('page' != get_option('show_on_front') ) || ( $reqpage != get_option('page_for_posts') ) ) {
|
if ( ('page' != get_option('show_on_front') ) || ( $reqpage !== get_option('page_for_posts') ) ) {
|
||||||
$q['pagename'] = str_replace('%2F', '/', urlencode(urldecode($q['pagename'])));
|
$q['pagename'] = str_replace('%2F', '/', urlencode(urldecode($q['pagename'])));
|
||||||
$page_paths = '/' . trim($q['pagename'], '/');
|
$page_paths = '/' . trim($q['pagename'], '/');
|
||||||
$q['pagename'] = sanitize_title(basename($page_paths));
|
$q['pagename'] = sanitize_title(basename($page_paths));
|
||||||
|
|
Loading…
Reference in New Issue