Make undefined property local variable
authorEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 28 Nov 2023 20:30:19 +0000 (09:30 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 28 Nov 2023 20:30:19 +0000 (09:30 +1300)
CRM/Event/Form/Task/Batch.php

index 614696c11b974ff4b443e208826af5471c562fed..1e1b896b1904ed8f75181298a72cc918fd767d1d 100644 (file)
@@ -155,7 +155,7 @@ class CRM_Event_Form_Task_Batch extends CRM_Event_Form_Task {
       CRM_Core_BAO_CustomField::getFields('Participant', FALSE, FALSE, NULL, NULL, TRUE)
     );
     $customFields = CRM_Utils_Array::crmArrayMerge($customFieldsEventType, $customFields);
-    $this->_customFields = CRM_Utils_Array::crmArrayMerge($customFieldsEvent, $customFields);
+    $customFields = CRM_Utils_Array::crmArrayMerge($customFieldsEvent, $customFields);
 
     foreach ($this->_participantIds as $participantId) {
       $roleId = CRM_Core_DAO::getFieldValue("CRM_Event_DAO_Participant", $participantId, 'role_id');
@@ -163,7 +163,7 @@ class CRM_Event_Form_Task_Batch extends CRM_Event_Form_Task {
       $eventTypeId = CRM_Core_DAO::getFieldValue("CRM_Event_DAO_Event", $eventId, 'event_type_id');
       foreach ($this->_fields as $name => $field) {
         if ($customFieldID = CRM_Core_BAO_CustomField::getKeyID($name)) {
-          $customValue = $this->_customFields[$customFieldID] ?? NULL;
+          $customValue = $customFields[$customFieldID] ?? NULL;
           $entityColumnValue = [];
           if (!empty($customValue['extends_entity_column_value'])) {
             $entityColumnValue = explode(CRM_Core_DAO::VALUE_SEPARATOR,