*
* @package CRM
* @copyright CiviCRM LLC https://civicrm.org/licensing
- * $Id$
- *
*/
/**
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) {
$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;
$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);