Skip to:
Content

BuddyPress.org

Ticket #5824: 5824.patch

File 5824.patch, 783 bytes (added by imath, 7 years ago)
  • src/bp-groups/bp-groups-classes.php

    diff --git src/bp-groups/bp-groups-classes.php src/bp-groups/bp-groups-classes.php
    index 6924794..95d2c76 100644
    class BP_Groups_Group { 
    901901                                $meta_query_where_clauses = array_values( array_filter( $meta_query_where_clauses ) );
    902902
    903903                                foreach( $matches_b[1] as $key => $group_id_clause ) {
    904                                         $sql_array['where'] .= ' ' . preg_replace( '/^(AND\s+[\(\s]+)/', '$1' . $group_id_clause . ' AND ', ltrim( $meta_query_where_clauses[ $key ] ) );
     904                                        foreach( $meta_query_where_clauses as $meta_query_where_clause ) {
     905                                                $sql_array['where'] .= ' ' . preg_replace( '/^(AND\s+[\(\s]+)/', '$1' . $group_id_clause . ' AND ', ltrim( $meta_query_where_clause ) );
     906                                        }
    905907                                }
    906908
    907909                        }