From 929155cf6f242e68d5f39e4b5772bead782da6fd Mon Sep 17 00:00:00 2001 From: Jitendra Purohit Date: Mon, 3 May 2021 12:03:20 +0530 Subject: [PATCH] fix fatal error on membership renewal --- CRM/Member/Form/MembershipRenewal.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Member/Form/MembershipRenewal.php b/CRM/Member/Form/MembershipRenewal.php index ed017fdb28..067de80d8d 100644 --- a/CRM/Member/Form/MembershipRenewal.php +++ b/CRM/Member/Form/MembershipRenewal.php @@ -202,7 +202,7 @@ class CRM_Member_Form_MembershipRenewal extends CRM_Member_Form { $defaults['total_amount'] = CRM_Utils_Money::formatLocaleNumericRoundedForDefaultCurrency(CRM_Core_DAO::getFieldValue('CRM_Member_DAO_MembershipType', $this->_memType, 'minimum_fee' - )); + ) ?? 0); $defaults['record_contribution'] = 0; $defaults['num_terms'] = 1; @@ -276,7 +276,7 @@ class CRM_Member_Form_MembershipRenewal extends CRM_Member_Form { //CRM-16950 $taxAmount = NULL; - $totalAmount = $values['minimum_fee'] ?? NULL; + $totalAmount = $values['minimum_fee'] ?? 0; // @todo - feels a bug - we use taxRate from the form default rather than from the specified type?!? if ($this->getTaxRateForFinancialType($values['financial_type_id'])) { $taxAmount = ($taxRate / 100) * CRM_Utils_Array::value('minimum_fee', $values); -- 2.25.1