From 31cc8d3d0648f81d4eacd099c675bd0c2b4c88ef Mon Sep 17 00:00:00 2001 From: Jon Goldberg Date: Fri, 20 Sep 2019 11:49:15 -0400 Subject: [PATCH] Fix FGB error --- CRM/RelateEntities/Utils.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CRM/RelateEntities/Utils.php b/CRM/RelateEntities/Utils.php index d529ee2..558449e 100644 --- a/CRM/RelateEntities/Utils.php +++ b/CRM/RelateEntities/Utils.php @@ -208,13 +208,15 @@ class CRM_RelateEntities_Utils { ) AS temp $groupByClause "; - + CRM_Core_DAO::disableFullGroupByMode(); if ($getCount) { - return CRM_Core_DAO::singleValueQuery($query, $queryParams); + $result = CRM_Core_DAO::singleValueQuery($query, $queryParams); } else { - return CRM_Core_DAO::executeQuery($query, $queryParams); + $result = CRM_Core_DAO::executeQuery($query, $queryParams); } + CRM_Core_DAO::reenableFullGroupByMode(); + return $result; } }