WordPress.org

Make WordPress Core

Ticket #17264: 17264.4.diff

File 17264.4.diff, 777 bytes (added by greuben, 7 years ago)

Patch for 3.1 branch

  • wp-includes/query.php

     
    22312231                        }
    22322232                }
    22332233
    2234                 if ( !empty( $this->tax_query->queries ) || !empty( $q['meta_key'] ) ) {
    2235                         $groupby = "{$wpdb->posts}.ID";
    2236                 }
    2237 
    22382234                // Author/user stuff
    22392235
    22402236                if ( empty($q['author']) || ($q['author'] == '0') ) {
     
    24802476                        $where .= $clauses['where'];
    24812477                }
    24822478
     2479                if ( !empty( $this->tax_query->queries ) || !empty( $q['meta_query'] ) ) {
     2480                        $groupby = "{$wpdb->posts}.ID";
     2481                }
     2482
    24832483                // Apply filters on where and join prior to paging so that any
    24842484                // manipulations to them are reflected in the paging by day queries.
    24852485                if ( !$q['suppress_filters'] ) {