diff --git a/includes/hooks-buddypress-group.php b/includes/hooks-buddypress-group.php index 164a50f..dc246cb 100644 --- a/includes/hooks-buddypress-group.php +++ b/includes/hooks-buddypress-group.php @@ -237,6 +237,10 @@ function cacsp_filter_query_for_bp_group( $query ) { // Convert group IDs to a tax query. $tq = $query->get( 'tax_query' ); + if ( ! is_array( $tq ) ) { + $tq = array(); + } + $group_terms = array(); foreach ( $group_ids as $group_id ) { $group_terms[] = 'group_' . $group_id;