Fix enotice regressionn
authoreileen <emcnaughton@wikimedia.org>
Tue, 18 Feb 2020 07:23:13 +0000 (20:23 +1300)
committereileen <emcnaughton@wikimedia.org>
Tue, 18 Feb 2020 07:24:56 +0000 (20:24 +1300)
This was merged to 5.23 but I made a booboo in it
https://github.com/civicrm/civicrm-core/commit/a3aed42a453009733e8feb2c56fde5750b37cd14

I think the params are actually not used so it's just the notice it causes but this fixes

CRM/Event/Form/Participant.php

index d1d5a95861b2ac879c94b844915c761285911ae0..3ed5ae1a5ab28ef6e459b531c7afe9c69ac366dc 100644 (file)
@@ -2205,9 +2205,9 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment
    */
   protected function getParticipantValue($fieldName) {
     if (!$this->participantRecord) {
-      $this->participantRecord = civicrm_api3('Participant', 'get', ['id' => $this->_id]);
+      $this->participantRecord = civicrm_api3('Participant', 'getsingle', ['id' => $this->_id]);
     }
-    return $this->participantRecord[$fieldName];
+    return $this->participantRecord[$fieldName] ?? $this->participantRecord['participant_' . $fieldName];
   }
 
   /**