Ticket #16465: 16465.patch
File 16465.patch, 1.0 KB (added by , 14 years ago) |
---|
-
wp-includes/query.php
2181 2181 $cat_query = wp_list_filter( $tax_query_in_and, array( 'taxonomy' => 'category' ) ); 2182 2182 if ( !empty( $cat_query ) ) { 2183 2183 $cat_query = reset( $cat_query ); 2184 if ( !isset( $cat_query['terms'][0] )) 2185 $cat_query['terms'][0] = ''; 2184 2186 $the_cat = get_term_by( $cat_query['field'], $cat_query['terms'][0], 'category' ); 2185 2187 if ( $the_cat ) { 2186 2188 $this->set( 'cat', $the_cat->term_id ); … … 2193 2195 $tag_query = wp_list_filter( $tax_query_in_and, array( 'taxonomy' => 'post_tag' ) ); 2194 2196 if ( !empty( $tag_query ) ) { 2195 2197 $tag_query = reset( $tag_query ); 2198 if ( !isset( $tag_query['terms'][0] )) 2199 $tag_query['terms'][0] = ''; 2196 2200 $the_tag = get_term_by( $tag_query['field'], $tag_query['terms'][0], 'post_tag' ); 2197 2201 if ( $the_tag ) { 2198 2202 $this->set( 'tag_id', $the_tag->term_id );