Answers.Body: <p>Just for the record - the issue is solved in CiviCRM version 5.36.1</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-05-05T13:08:30.577Z
Answers.LastActivityDate: 2021-05-05T13:08:30.577Z
Answers.UserDisplayName: Tobias Krause
Body: <p>This error seems to be connected with the update to version 5.36 as it just appeared after that.</p>
  <p>When editing an existing membership or adding a new membership the following error appears in the logs:</p>
  <p><code>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-&gt;setOverrideTotalAmount() (line 152 of C:\wamp64\www\civicrmd8\httpdocs\sites\all\modules\civicrm\CRM\Financial\BAO\Order.php).</code></p>
  <p>I feel it could be connected to <a href="https://github.com/civicrm/civicrm-core/pull/19476/files" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/pull/19476/files</a></p>
  <p>A quick fix I found was to change line 486 of civicrm/CRM/Member/Form.php from</p>
  <p><code>$this-&gt;order-&gt;setOverrideTotalAmount($formValues['total_amount']);</code></p>
  <p>to</p>
  <p><code>$this-&gt;order-&gt;setOverrideTotalAmount((int) $formValues['total_amount']);</code></p>
  <p>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.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-04-19T13:44:00.837Z
Comments.Text: thanks Tobias. It also impacted Stripe payment gateway
Comments.UserDisplayName: Guillaume Sorel
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-04-22T18:45:19.833Z
Comments.Text: I'm seeing this issue too, in civiCRM version 5.36.0
Comments.UserDisplayName: A. Block
Tags: <civimember>
Title: New error when editing membership: Argument 1 passed to CRM_Financial_BAO_Order::setOverrideTotalAmount() must be of the type float, string given
ThreadText: # New error when editing membership: Argument 1 passed to CRM_Financial_BAO_Order::setOverrideTotalAmount() must be of the type float, string given
  
  (Asked by: username_0 on 2021-04-13)
  
  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($formValues['total_amount']);`
  
  to
  
  `$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.
  
  **Tags:** civimember
  
  > **Comments:**
  > **username_1**: thanks username_0. It also impacted Stripe payment gateway  
  > **username_2**: I'm seeing this issue too, in civiCRM version 5.36.0  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2021-05-05. Score: 1
  
  Just for the record - the issue is solved in CiviCRM version 5.36.1
  
  
  ---
  
  