mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-31 10:44:26 +00:00
Fix warning caused by empty meta query. See #14645
git-svn-id: https://develop.svn.wordpress.org/trunk@15768 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2113,9 +2113,11 @@ class WP_Query extends WP_Object_Query {
|
||||
$where .= ')';
|
||||
}
|
||||
|
||||
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;
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user