From 6630f8f88c0551e367dd186f8592886bbb44dc02 Mon Sep 17 00:00:00 2001 From: DemeritCowboy Date: Thu, 8 Aug 2019 19:01:48 -0400 Subject: [PATCH] just rename local var activityTName --- CRM/Activity/Form/Activity.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/CRM/Activity/Form/Activity.php b/CRM/Activity/Form/Activity.php index dc6718406bf5..dd5c7052f920 100644 --- a/CRM/Activity/Form/Activity.php +++ b/CRM/Activity/Form/Activity.php @@ -325,14 +325,15 @@ public function preProcess() { // Assigning Activity type name. if ($this->_activityTypeId) { - $activityTName = CRM_Core_OptionGroup::values('activity_type', FALSE, FALSE, FALSE, 'AND v.value = ' . $this->_activityTypeId, 'label'); - if ($activityTName[$this->_activityTypeId]) { - $this->_activityTypeName = $activityTName[$this->_activityTypeId]; - $this->assign('activityTName', $activityTName[$this->_activityTypeId]); + $activityTypeDisplayLabels = CRM_Core_OptionGroup::values('activity_type', FALSE, FALSE, FALSE, 'AND v.value = ' . $this->_activityTypeId, 'label'); + if ($activityTypeDisplayLabels[$this->_activityTypeId]) { + $this->_activityTypeName = $activityTypeDisplayLabels[$this->_activityTypeId]; + // can't change this instance of activityTName yet - will come back to it dev/core#1116 + $this->assign('activityTName', $activityTypeDisplayLabels[$this->_activityTypeId]); } // Set title. - if (isset($activityTName)) { - $activityName = CRM_Utils_Array::value($this->_activityTypeId, $activityTName); + if (isset($activityTypeDisplayLabels)) { + $activityName = CRM_Utils_Array::value($this->_activityTypeId, $activityTypeDisplayLabels); if ($this->_currentlyViewedContactId) { $displayName = CRM_Contact_BAO_Contact::displayName($this->_currentlyViewedContactId);