dev/core#2543 Fix Membership Edit PHP fatal when no recorded payment
authorMathieu Lutfy <mathieu@symbiotic.coop>
Fri, 16 Apr 2021 12:51:48 +0000 (08:51 -0400)
committerMathieu Lutfy <mathieu@bidon.ca>
Fri, 16 Apr 2021 12:54:59 +0000 (08:54 -0400)
CRM/Member/Form.php

index 5b65b75372109b9e056ee880d9a3cd02117be327..1ea223b7e880b320a876b0a083c7446bd533fae9 100644 (file)
@@ -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;