404 if category not found. fixes #2123

git-svn-id: https://develop.svn.wordpress.org/trunk@3484 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2006-01-25 03:59:41 +00:00
parent 65ebbb6385
commit c89ddb677f
1 changed files with 1 additions and 1 deletions

View File

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