Merge pull request #18143 from mattwire/membertabbuttons
[civicrm-core.git] / CRM / Event / Form / ParticipantFeeSelection.php
index bc604dbbc2f91907c23a203a9e53f0e15dd5ec1a..876da092c258951cbbb5bfb0535450c6bb8b6214 100644 (file)
@@ -13,8 +13,6 @@
  *
  * @package CRM
  * @copyright CiviCRM LLC https://civicrm.org/licensing
- * $Id$
- *
  */
 
 /**
@@ -296,7 +294,7 @@ class CRM_Event_Form_ParticipantFeeSelection extends CRM_Core_Form {
     unset($event['end_date']);
 
     $role = CRM_Event_PseudoConstant::participantRole();
-    $participantRoles = CRM_Utils_Array::value('role_id', $params);
+    $participantRoles = $params['role_id'] ?? NULL;
     if (is_array($participantRoles)) {
       $selectedRoles = [];
       foreach (array_keys($participantRoles) as $roleId) {
@@ -305,7 +303,7 @@ class CRM_Event_Form_ParticipantFeeSelection extends CRM_Core_Form {
       $event['participant_role'] = implode(', ', $selectedRoles);
     }
     else {
-      $event['participant_role'] = CRM_Utils_Array::value($participantRoles, $role);
+      $event['participant_role'] = $role[$participantRoles] ?? NULL;
     }
     $event['is_monetary'] = $this->_isPaidEvent;
 
@@ -374,8 +372,8 @@ class CRM_Event_Form_ParticipantFeeSelection extends CRM_Core_Form {
       $sendTemplateParams['from'] = $receiptFrom;
       $sendTemplateParams['toName'] = $this->_contributorDisplayName;
       $sendTemplateParams['toEmail'] = $this->_contributorEmail;
-      $sendTemplateParams['cc'] = CRM_Utils_Array::value('cc', $this->_fromEmails);
-      $sendTemplateParams['bcc'] = CRM_Utils_Array::value('bcc', $this->_fromEmails);
+      $sendTemplateParams['cc'] = $this->_fromEmails['cc'] ?? NULL;
+      $sendTemplateParams['bcc'] = $this->_fromEmails['bcc'] ?? NULL;
     }
 
     list($mailSent, $subject, $message, $html) = CRM_Core_BAO_MessageTemplate::sendTemplate($sendTemplateParams);