From 3f20b53b12e7734504e3009d5d972b9002a16173 Mon Sep 17 00:00:00 2001 From: dd32 Date: Fri, 2 Apr 2010 08:16:20 +0000 Subject: [PATCH] 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: http://svn.automattic.com/wordpress/trunk@13944 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/classes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/classes.php b/wp-includes/classes.php index 40a8a84a26..1eef582de9 100644 --- a/wp-includes/classes.php +++ b/wp-includes/classes.php @@ -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;