Ticket #16464: 16464.patch
| File 16464.patch, 905 bytes (added by , 15 years ago) |
|---|
-
wp-includes/query.php
2188 2188 if ( !empty( $cat_query ) ) { 2189 2189 $cat_query = reset( $cat_query ); 2190 2190 $the_cat = get_term_by( $cat_query['field'], $cat_query['terms'][0], 'category' ); 2191 if ( $the_cat ) {2191 if ( $the_cat && ! is_wp_error( $the_cat ) ) { 2192 2192 $this->set( 'cat', $the_cat->term_id ); 2193 2193 $this->set( 'category_name', $the_cat->slug ); 2194 2194 } … … 2200 2200 if ( !empty( $tag_query ) ) { 2201 2201 $tag_query = reset( $tag_query ); 2202 2202 $the_tag = get_term_by( $tag_query['field'], $tag_query['terms'][0], 'post_tag' ); 2203 if ( $the_tag ) {2203 if ( $the_tag && ! is_wp_error( $the_tag ) ) { 2204 2204 $this->set( 'tag_id', $the_tag->term_id ); 2205 2205 } 2206 2206 unset( $the_tag );