Cannot edit a membership without a payment [fairly recent regression]
To reproduce:
- https://dmaster.demo.civicrm.org/civicrm/contact/view?reset=1&cid=203
- Add a membership of type general
- Important: Do not recurd a payment
- save
- Then click "edit" on that new membership
- do not edit anything
- click save
Causes a PHP fatal error:
TypeError: Argument 1 passed to CRM_Financial_BAO_Order::setOverrideTotalAmount() must be of the type float, string given
$this->order->setOverrideTotalAmount($formValues['total_amount']);
Casting to float seems to fix it, but presumably not a good idea.