From 9980f375d0d42dda0b770d8ea2e1b1d4ed564662 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 24 Nov 2023 07:41:35 +1300 Subject: [PATCH] Use local variable rather than undefined property to build array This variable is specific to the function it lives in --- CRM/Event/Form/Registration/Confirm.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CRM/Event/Form/Registration/Confirm.php b/CRM/Event/Form/Registration/Confirm.php index f6327f729a..3b63cefb46 100644 --- a/CRM/Event/Form/Registration/Confirm.php +++ b/CRM/Event/Form/Registration/Confirm.php @@ -245,9 +245,9 @@ class CRM_Event_Form_Registration_Confirm extends CRM_Event_Form_Registration { } $this->_amount[$k]['label'] = preg_replace('//', '', $v['amount_level']) . ' - ' . $append; - $this->_part[$k]['info'] = ($v['first_name'] ?? '') . ' ' . ($v['last_name'] ?? ''); + $participantDetails[$k]['info'] = ($v['first_name'] ?? '') . ' ' . ($v['last_name'] ?? ''); if (empty($v['first_name'])) { - $this->_part[$k]['info'] = $append; + $participantDetails[$k]['info'] = $append; } /*CRM-16320 */ @@ -267,8 +267,8 @@ class CRM_Event_Form_Registration_Confirm extends CRM_Event_Form_Registration { $this->set('individual', $individual); } - $this->assign('part', $this->_part); - $this->set('part', $this->_part); + $this->assign('part', $participantDetails); + $this->set('part', $participantDetails); $this->assign('amounts', $this->_amount); $this->assign('totalAmount', $this->_totalAmount); $this->set('totalAmount', $this->_totalAmount); -- 2.25.1