Ticket #1969: is_category.diff

File is_category.diff, 1.0 KB (added by chuyskywalker, 6 years ago)

fixes said category/404 bug

  • wp-includes/classes.php

     
    8282 
    8383                if ('404' == $qv['error']) { 
    8484                        $this->is_404 = true; 
    85                         if ( !empty($query) ) { 
     85                        if ( !empty($query) ) {  
    8686                                do_action('parse_query', array(&$this)); 
    8787                        } 
    8888                        return; 
     
    16121612                // issue a 404 if one was already issued, if the request was a search, 
    16131613                // or if the request was a regular query string request rather than a 
    16141614                // permalink request. 
    1615                 if ( (0 == count($wp_query->posts)) && !is_404() && !is_search() && ( $this->did_permalink || (!empty($_SERVER['QUERY_STRING']) && (false === strpos($_SERVER['REQUEST_URI'], '?'))) ) ) { 
     1615                if ( (0 == count($wp_query->posts)) && !is_404() && !is_category() && !is_search() && ( $this->did_permalink || (!empty($_SERVER['QUERY_STRING']) && (false === strpos($_SERVER['REQUEST_URI'], '?'))) ) ) { 
    16161616                        $wp_query->set_404(); 
    16171617                        status_header( 404 ); 
    16181618                }       elseif( is_404() != true ) {