Make WordPress Core

Ticket #45582: 45582.3.diff

File 45582.3.diff, 721 bytes (added by desrosj, 5 years ago)

Move $groupby higher up to the correct location.

  • src/wp-includes/class-wp-site-query.php

     
    570570                        $this->sql_clauses['where']['date_query'] = preg_replace( '/^\s*AND\s*/', '', $this->date_query->get_sql() );
    571571                }
    572572
    573                 $join = '';
     573                $join    = '';
     574                $groupby = '';
    574575
    575576                if ( ! empty( $this->meta_query_clauses ) ) {
    576577                        $join .= $this->meta_query_clauses['join'];
     
    585586
    586587                $where = implode( ' AND ', $this->sql_clauses['where'] );
    587588
    588                 $groupby = '';
    589 
    590589                $pieces = array( 'fields', 'join', 'where', 'orderby', 'limits', 'groupby' );
    591590
    592591                /**