This error seems to be connected with the update to version 5.36 as it just appeared after that.

When editing an existing membership or adding a new membership the following error appears in the logs:

TypeError: Argument 1 passed to CRM_Financial_BAO_Order::setOverrideTotalAmount() must be of the type float, string given, called in C:\wamp64\www\civicrmd8\httpdocs\sites\all\modules\civicrm\CRM\Member\Form.php on line 486 in CRM_Financial_BAO_Order->setOverrideTotalAmount() (line 152 of C:\wamp64\www\civicrmd8\httpdocs\sites\all\modules\civicrm\CRM\Financial\BAO\Order.php).

I feel it could be connected to https://github.com/civicrm/civicrm-core/pull/19476/files

A quick fix I found was to change line 486 of civicrm/CRM/Member/Form.php from



$this->order->setOverrideTotalAmount((int) $formValues['total_amount']);

But I am not quite sure if this really solves the issue or what sideeffects I do not see. Maybe this type casting should be done earlier in the process? or maybe the problem lies somewhere else? In my case the value of $formValues['total_amount'] is an empty string but I do not know where this value comes from.

  • thanks Tobias. It also impacted Stripe payment gateway – Guillaume Sorel Apr 19 at 13:44
  • I'm seeing this issue too, in civiCRM version 5.36.0 – A. Block Apr 22 at 18:45

Just for the record - the issue is solved in CiviCRM version 5.36.1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.