Don't prevent 404'ing on tax/author pages when a paged page is requested which doesnt contain posts. For example, /category/animal/page/9999999/. Allows for /category/empty_cat/ to not 404. Fixes #11857

git-svn-id: https://develop.svn.wordpress.org/trunk@13944 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2010-04-02 08:16:20 +00:00
parent 9b2113d8cd
commit af3a5edd74

View File

@ -476,7 +476,7 @@ class WP {
if ( ( 0 == count( $wp_query->posts ) ) && !is_404() && !is_robots() && !is_search() && !is_home() ) {
// Don't 404 for these queries if they matched an object.
if ( ( is_tag() || is_category() || is_tax() || is_author() ) && $wp_query->get_queried_object() ) {
if ( ( is_tag() || is_category() || is_tax() || is_author() ) && $wp_query->get_queried_object() && !is_paged() ) {
if ( !is_404() )
status_header( 200 );
return;