Make WordPress Core

Ticket #14052: classes.patch

File classes.patch, 717 bytes (added by maximeh, 15 years ago)
  • classes.php

    class WP { 
    474474        function handle_404() {
    475475                global $wp_query;
    476476
    477                 if ( ( 0 == count( $wp_query->posts ) ) && !is_404() && !is_robots() && !is_search() && !is_home() ) {
     477                if ( ( 0 == count( $wp_query->posts ) ) && !is_404() && !is_robots() && !is_search() && !is_home() && ( $this->did_permalink || (!empty($_SERVER['QUERY_STRING']) && (false === strpos($_SERVER['REQUEST_URI'], '?')))) ) {
    478478                        // Don't 404 for these queries if they matched an object.
    479479                        if ( ( is_tag() || is_category() || is_tax() || is_author() ) && $wp_query->get_queried_object() && !is_paged() ) {
    480480                                if ( !is_404() )