[REF][PHP8.2] Switch dynamic property to local variable
authorBradley Taylor <hello@brad-taylor.co.uk>
Sun, 10 Dec 2023 10:26:48 +0000 (10:26 +0000)
committerBradley Taylor <hello@brad-taylor.co.uk>
Sun, 10 Dec 2023 10:26:48 +0000 (10:26 +0000)
CRM/Event/Form/Registration.php

index f94dd144d537483906e1ee81a3fe774201549da2..954950e97294e72d2a50f977c26441b15b27c3c8 100644 (file)
@@ -1489,7 +1489,7 @@ class CRM_Event_Form_Registration extends CRM_Core_Form {
    */
   public function processRegistration($params, $contactID = NULL) {
     $session = CRM_Core_Session::singleton();
-    $this->_participantInfo = [];
+    $participantInfo = [];
 
     // CRM-4320, lets build array of cancelled additional participant ids
     // those are drop or skip by primary at the time of confirmation.
@@ -1526,10 +1526,10 @@ class CRM_Event_Form_Registration extends CRM_Core_Form {
             }
           }
           if ($participantEmail) {
-            $this->_participantInfo[] = $participantEmail;
+            $participantInfo[] = $participantEmail;
           }
           else {
-            $this->_participantInfo[] = $value['first_name'] . ' ' . $value['last_name'];
+            $participantInfo[] = $value['first_name'] . ' ' . $value['last_name'];
           }
         }
         elseif (!empty($value['contact_id'])) {
@@ -1587,8 +1587,8 @@ class CRM_Event_Form_Registration extends CRM_Core_Form {
     }
 
     //set information about additional participants if exists
-    if (count($this->_participantInfo)) {
-      $this->set('participantInfo', $this->_participantInfo);
+    if (count($participantInfo)) {
+      $this->set('participantInfo', $participantInfo);
     }
 
     if ($this->getPaymentProcessorObject()->supports('noReturn')