Fix warning caused by empty meta query. See #14645
git-svn-id: http://svn.automattic.com/wordpress/trunk@15768 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7bb63ebe44
commit
ba8217c8df
|
@ -2113,9 +2113,11 @@ class WP_Query extends WP_Object_Query {
|
|||
$where .= ')';
|
||||
}
|
||||
|
||||
if ( !empty( $q['meta_query'] ) ) {
|
||||
list( $meta_join, $meta_where ) = $this->get_meta_sql( $q['meta_query'], $wpdb->posts, 'ID', $wpdb->postmeta, 'post_id' );
|
||||
$join .= $meta_join;
|
||||
$where .= $meta_where;
|
||||
}
|
||||
|
||||
// Apply filters on where and join prior to paging so that any
|
||||
// manipulations to them are reflected in the paging by day queries.
|
||||
|
|
|
@ -461,9 +461,11 @@ class WP_User_Query extends WP_Object_Query {
|
|||
$qv['meta_query'][] = $cap_meta_query;
|
||||
}
|
||||
|
||||
if ( !empty( $qv['meta_query'] ) ) {
|
||||
list( $meta_join, $meta_where ) = $this->get_meta_sql( $qv['meta_query'], $wpdb->users, 'ID', $wpdb->usermeta, 'user_id' );
|
||||
$this->query_from .= $meta_join;
|
||||
$this->query_where .= $meta_where;
|
||||
}
|
||||
|
||||
if ( !empty( $qv['include'] ) ) {
|
||||
$ids = implode( ',', wp_parse_id_list( $qv['include'] ) );
|
||||
|
|
Loading…
Reference in New Issue