Make WordPress Core

Ticket #17316: 17316.patch

File 17316.patch, 702 bytes (added by scribu, 12 years ago)

check only get_queried_object()

  • wp-includes/class-wp.php

     
    470470
    471471                if ( !is_admin() && ( 0 == count( $wp_query->posts ) ) && !is_404() && !is_robots() && !is_search() && !is_home() ) {
    472472                        // Don't 404 for these queries if they matched an object.
    473                         if ( ( is_tag() || is_category() || is_tax() || is_author() ) && $wp_query->get_queried_object() && !is_paged() ) {
    474                                 if ( !is_404() )
     473                        if ( $wp_query->get_queried_object() && !is_paged() ) {
     474                                if ( !is_404() ) {
    475475                                        status_header( 200 );
     476                                }
    476477                                return;
    477478                        }
    478479                        $wp_query->set_404();