WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/20/2010 09:10:20 PM (9 years ago)
Author:
ryan
Message:

If the queried term does not exist make sure no posts are returned in the query rather than falling through to querying all posts. Fixes 404s when querying cats that do not exist. see #12891

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/taxonomy.php

    r16467 r16511  
    540540        foreach ( $taxonomies as $taxonomy ) {
    541541            if ( ! taxonomy_exists( $taxonomy ) )
    542                 return ' AND 0 = 1';
     542                return array( 'join' => '', 'where' => ' AND 0 = 1');
    543543        }
    544544
     
    593593        }
    594594    }
     595
    595596    return compact( 'join', 'where' );
    596597}
Note: See TracChangeset for help on using the changeset viewer.