diff --git a/CRM/Core/BAO/CustomQuery.php b/CRM/Core/BAO/CustomQuery.php index a3e2cf273677..776d2554eca9 100644 --- a/CRM/Core/BAO/CustomQuery.php +++ b/CRM/Core/BAO/CustomQuery.php @@ -148,7 +148,7 @@ public function getFields() { * @param array $locationSpecificFields */ public function __construct($ids, $contactSearch = FALSE, $locationSpecificFields = []) { - $this->_ids = &$ids; + $this->_ids = $ids; $this->_locationSpecificCustomFields = $locationSpecificFields; $this->_select = []; @@ -222,10 +222,6 @@ public function select() { $this->_select[$fieldName] = "{$field['table_name']}.{$field['column_name']} as $fieldName"; $this->_element[$fieldName] = 1; $joinTable = $field['search_table']; - // CRM-14265 - if ($joinTable == 'civicrm_group' || empty($joinTable)) { - return; - } $this->joinCustomTableForField($field);