From fcbb756b874f3a5de2e5258249669eb7c4ec1f20 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 20 Jun 2013 17:14:34 +0530 Subject: [PATCH] BAO_CustomGroup - Fix warning when displaying "Edit Contact" on a site with no (visible, well-defined, single-value) CustomGroups. --- CRM/Core/BAO/CustomGroup.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CRM/Core/BAO/CustomGroup.php b/CRM/Core/BAO/CustomGroup.php index f8a51bf77c..a7ee8724e4 100644 --- a/CRM/Core/BAO/CustomGroup.php +++ b/CRM/Core/BAO/CustomGroup.php @@ -1770,6 +1770,8 @@ SELECT IF( EXISTS(SELECT name FROM civicrm_contact_type WHERE name like %1), 1, * @param boolean $returnCount true if customValue count needs to be returned */ static function buildCustomDataView(&$form, &$groupTree, $returnCount = FALSE, $gID = NULL, $prefix = NULL) { + $details = array(); + foreach ($groupTree as $key => $group) { if ($key === 'info') { continue; @@ -1826,6 +1828,7 @@ SELECT IF( EXISTS(SELECT name FROM civicrm_contact_type WHERE name like %1), 1, return count($details[$gID]); } else { + $countValue = array(); foreach( $details as $key => $value ) { $countValue[$key] = count($details[$key]); } -- 2.25.1