From e173279c62695154717a01486152eb7e6b30c03f Mon Sep 17 00:00:00 2001 From: eileen Date: Wed, 4 Nov 2015 18:13:00 -0800 Subject: [PATCH] CRM-17509 fix fatal on getting amount for waitlisted registrants --- CRM/Event/Form/Registration.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CRM/Event/Form/Registration.php b/CRM/Event/Form/Registration.php index 44a4a6dccd..f5260d8d49 100644 --- a/CRM/Event/Form/Registration.php +++ b/CRM/Event/Form/Registration.php @@ -1515,6 +1515,12 @@ WHERE v.option_group_id = g.id if (!empty($this->_values['discount'][$discountID])) { return $this->_values['discount'][$discountID][$params['amount']]['label']; } + if (empty($params['priceSetId'])) { + // CRM-17509 An example of this is where the person is being waitlisted & there is no payment. + // ideally we would have calculated amount first & only call this is there is an + // amount but the flow needs more changes for that. + return ''; + } return CRM_Price_BAO_PriceSet::getAmountLevelText($params); } -- 2.25.1