From 3845929507f7d0bdfcb8db3e906471004e4bbffb Mon Sep 17 00:00:00 2001 From: Jitendra Purohit Date: Fri, 1 Mar 2019 08:09:31 +0530 Subject: [PATCH] dev/core#768 - Fix fatal error on group search --- CRM/Contact/BAO/Query.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/CRM/Contact/BAO/Query.php b/CRM/Contact/BAO/Query.php index cdd3f47618..ac81fec5bf 100644 --- a/CRM/Contact/BAO/Query.php +++ b/CRM/Contact/BAO/Query.php @@ -3013,10 +3013,13 @@ class CRM_Contact_BAO_Query { if (count($regularGroupIDs) > 1) { $op = strpos($op, 'IN') ? $op : ($op == '!=') ? 'NOT IN' : 'IN'; } - $groupIds = CRM_Utils_Type::validate( - implode(',', (array) $regularGroupIDs), - 'CommaSeparatedIntegers' - ); + $groupIds = ''; + if (!empty($regularGroupIDs)) { + $groupIds = CRM_Utils_Type::validate( + implode(',', (array) $regularGroupIDs), + 'CommaSeparatedIntegers' + ); + } $gcTable = "`civicrm_group_contact-" . uniqid() . "`"; $joinClause = array("contact_a.id = {$gcTable}.contact_id"); -- 2.25.1