Ticket #16717: 16717.2.diff
| File 16717.2.diff, 899 bytes (added by , 15 years ago) |
|---|
-
wp-includes/query.php
2185 2185 if ( !empty( $cat_query ) ) { 2186 2186 $cat_query = reset( $cat_query ); 2187 2187 $the_cat = get_term_by( $cat_query['field'], $cat_query['terms'][0], 'category' ); 2188 if ( $the_cat ) {2188 if ( $the_cat && ! is_wp_error( $the_cat ) ) { 2189 2189 $this->set( 'cat', $the_cat->term_id ); 2190 2190 $this->set( 'category_name', $the_cat->slug ); 2191 2191 } … … 2197 2197 if ( !empty( $tag_query ) ) { 2198 2198 $tag_query = reset( $tag_query ); 2199 2199 $the_tag = get_term_by( $tag_query['field'], $tag_query['terms'][0], 'post_tag' ); 2200 if ( $the_tag ) {2200 if ( $the_tag && ! is_wp_error( $the_tag ) ) { 2201 2201 $this->set( 'tag_id', $the_tag->term_id ); 2202 2202 } 2203 2203 unset( $the_tag );