WordPress.org

Make WordPress Core

Ticket #16812: query.patch

File query.patch, 403 bytes (added by Chad Killingsworth, 4 years ago)

Query.php patch for group by/order by conflict

  • query.php

     
    22112211                        } 
    22122212                } 
    22132213 
    2214                 if ( !empty( $this->tax_query->queries ) || !empty( $q['meta_key'] ) ) { 
     2214                if ( ( !empty( $this->tax_query->queries ) && !empty( $join ) ) || !empty( $q['meta_key'] ) ) { 
    22152215                        $groupby = "{$wpdb->posts}.ID"; 
    22162216                } 
    22172217