Remove check on unexistant $ids var in WP_Query::get_posts. Props Utkarsh. See #12891
git-svn-id: http://svn.automattic.com/wordpress/trunk@16116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b890848aaa
commit
7f7d5e3c75
|
@ -1901,7 +1901,6 @@ class WP_Query extends WP_Object_Query {
|
||||||
$where .= $this->get_tax_sql( $q['tax_query'], "$wpdb->posts.ID" );
|
$where .= $this->get_tax_sql( $q['tax_query'], "$wpdb->posts.ID" );
|
||||||
|
|
||||||
// Back-compat
|
// Back-compat
|
||||||
if ( !empty( $ids ) ) {
|
|
||||||
$cat_query = wp_list_filter( $q['tax_query'], array( 'taxonomy' => 'category' ) );
|
$cat_query = wp_list_filter( $q['tax_query'], array( 'taxonomy' => 'category' ) );
|
||||||
if ( !empty( $cat_query ) ) {
|
if ( !empty( $cat_query ) ) {
|
||||||
$cat_query = reset( $cat_query );
|
$cat_query = reset( $cat_query );
|
||||||
|
@ -1913,9 +1912,6 @@ class WP_Query extends WP_Object_Query {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unset( $ids );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( !empty($q['meta_key']) ) {
|
if ( !empty($q['meta_key']) ) {
|
||||||
$groupby = "{$wpdb->posts}.ID";
|
$groupby = "{$wpdb->posts}.ID";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue