From: Mathieu Lutfy Date: Fri, 16 Apr 2021 12:51:48 +0000 (-0400) Subject: dev/core#2543 Fix Membership Edit PHP fatal when no recorded payment X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=fc690477548024695501ee77aa8e0d2d00de7718;p=civicrm-core.git dev/core#2543 Fix Membership Edit PHP fatal when no recorded payment --- diff --git a/CRM/Member/Form.php b/CRM/Member/Form.php index 5b65b75372..1ea223b7e8 100644 --- a/CRM/Member/Form.php +++ b/CRM/Member/Form.php @@ -483,7 +483,7 @@ class CRM_Member_Form extends CRM_Contribute_Form_AbstractEditPayment { if ($priceSetDetails[$this->order->getPriceSetID()]['is_quick_config'] && isset($formValues['total_amount'])) { // Amount overrides only permitted on quick config. // Possibly Order object should enforce this... - $this->order->setOverrideTotalAmount($formValues['total_amount']); + $this->order->setOverrideTotalAmount((float) $formValues['total_amount']); } $this->order->setOverrideFinancialTypeID((int) $formValues['financial_type_id']); return $formValues;