From 9ca472a10b050ec6702888338e787264d739f8b2 Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Thu, 14 Feb 2019 23:03:02 +0000 Subject: [PATCH] dev/core/issues/726, Fixed fatal error when searched using group type --- CRM/Contact/BAO/Query.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CRM/Contact/BAO/Query.php b/CRM/Contact/BAO/Query.php index 2db3cb961640..807734aa55fb 100644 --- a/CRM/Contact/BAO/Query.php +++ b/CRM/Contact/BAO/Query.php @@ -3018,6 +3018,10 @@ public function group($values) { $regularGroupIDs = array_merge($regularGroupIDs, $childGroupIds); } + if (empty($regularGroupIDs)) { + $regularGroupIDs = [0]; + } + // if $regularGroupIDs is populated with regular child group IDs // then change the mysql operator to desired if (count($regularGroupIDs) > 1) {