From b6c268485372ba5996a405d9d26fccfe01d73bcf Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Thu, 22 Oct 2020 07:38:17 +1100 Subject: [PATCH] Fix the loading of groups on the contact Individual screen --- CRM/Contact/Form/Edit/TagsAndGroups.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/Form/Edit/TagsAndGroups.php b/CRM/Contact/Form/Edit/TagsAndGroups.php index 73e9420dff..52d0f9d7b7 100644 --- a/CRM/Contact/Form/Edit/TagsAndGroups.php +++ b/CRM/Contact/Form/Edit/TagsAndGroups.php @@ -93,7 +93,7 @@ class CRM_Contact_Form_Edit_TagsAndGroups { $attributes['skiplabel'] = TRUE; $elements = []; $groupsOptions = []; - foreach ($groups as $group) { + foreach ($groups as $key => $group) { $id = $group['id']; // make sure that this group has public visibility if ($visibility && @@ -103,7 +103,7 @@ class CRM_Contact_Form_Edit_TagsAndGroups { } if ($groupElementType == 'select') { - $groupsOptions[$id] = $group; + $groupsOptions[$key] = $group; } else { $form->_tagGroup[$fName][$id]['description'] = $group['description']; -- 2.25.1