Don't show 404s for empty cats, fixes #1969

git-svn-id: https://develop.svn.wordpress.org/trunk@3215 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2005-11-28 03:15:48 +00:00
parent ec77539416
commit 99fcdc938f

View File

@ -1620,7 +1620,7 @@ class WP {
// issue a 404 if one was already issued, if the request was a search,
// or if the request was a regular query string request rather than a
// permalink request.
if ( (0 == count($wp_query->posts)) && !is_404() && !is_search() && ( $this->did_permalink || (!empty($_SERVER['QUERY_STRING']) && (false === strpos($_SERVER['REQUEST_URI'], '?'))) ) ) {
if ( (0 == count($wp_query->posts)) && !is_404() && !is_category() && !is_search() && ( $this->did_permalink || (!empty($_SERVER['QUERY_STRING']) && (false === strpos($_SERVER['REQUEST_URI'], '?'))) ) ) {
$wp_query->set_404();
status_header( 404 );
} elseif( is_404() != true ) {