From: Bradley Taylor Date: Thu, 21 Dec 2023 17:29:21 +0000 (+0000) Subject: [REF][PHP8.2] Local variable for tagGroup X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=15a88a78712e1a3736907234f903c5e9244a5fd1;p=civicrm-core.git [REF][PHP8.2] Local variable for tagGroup --- diff --git a/CRM/Contact/Form/Edit/TagsAndGroups.php b/CRM/Contact/Form/Edit/TagsAndGroups.php index fdc59e7b6e..bb7da48e3b 100644 --- a/CRM/Contact/Form/Edit/TagsAndGroups.php +++ b/CRM/Contact/Form/Edit/TagsAndGroups.php @@ -58,9 +58,7 @@ class CRM_Contact_Form_Edit_TagsAndGroups { $groupElementType = 'checkbox', $public = FALSE ) { - if (!isset($form->_tagGroup)) { - $form->_tagGroup = []; - } + $tagGroup = []; $form->addExpectedSmartyVariable('type'); $form->addOptionalQuickFormElement('group'); // NYSS 5670 @@ -109,7 +107,7 @@ class CRM_Contact_Form_Edit_TagsAndGroups { $groupsOptions[$key] = $group; } else { - $form->_tagGroup[$fName][$id]['description'] = $group['description']; + $tagGroup[$fName][$id]['description'] = $group['description']; $elements[] = &$form->addElement('advcheckbox', $id, NULL, $group['text'], $attributes); } } @@ -143,7 +141,7 @@ class CRM_Contact_Form_Edit_TagsAndGroups { $parentNames = CRM_Core_BAO_Tag::getTagSet('civicrm_contact'); CRM_Core_Form_Tag::buildQuickForm($form, $parentNames, 'civicrm_contact', $contactId, FALSE, TRUE); } - $form->assign('tagGroup', $form->_tagGroup); + $form->assign('tagGroup', $tagGroup); } /**