From: larssandergreen Date: Thu, 25 May 2023 15:55:39 +0000 (-0600) Subject: Fix PHP8 on participant X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9f512e1ee08d6a0c313778eba0537dd00be433f9;p=civicrm-core.git Fix PHP8 on participant --- diff --git a/CRM/Event/Form/Participant.php b/CRM/Event/Form/Participant.php index cfd7a5b2c2..df92a11045 100644 --- a/CRM/Event/Form/Participant.php +++ b/CRM/Event/Form/Participant.php @@ -1740,7 +1740,7 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment } $form->assign('onlinePendingContributionId', $form->get('onlinePendingContributionId')); - $form->assign('paid', $form->_isPaidEvent); + $form->assign('paid', $form->_isPaidEvent ?? NULL); $form->addElement('checkbox', 'send_receipt', @@ -2266,6 +2266,7 @@ INNER JOIN civicrm_price_field_value value ON ( value.id = lineItem.price_field_ */ protected function assignUrlPath() { $this->assign('urlPath', 'civicrm/contact/view/participant'); + $this->assign('urlPathVar', NULL); if (!$this->_id && !$this->_contactId) { $breadCrumbs = [ [ diff --git a/templates/CRM/Event/Form/Participant.tpl b/templates/CRM/Event/Form/Participant.tpl index 19c9d2849f..318c6ab59e 100644 --- a/templates/CRM/Event/Form/Participant.tpl +++ b/templates/CRM/Event/Form/Participant.tpl @@ -15,7 +15,7 @@ {* Main event form template *} {else}
- {if $newCredit AND $action EQ 1 AND $participantMode EQ null} + {if $action EQ 1 AND ($context EQ 'participant' OR $context EQ 'standalone') AND $newCredit AND $participantMode EQ null}