Answers.Body: <p>A couple of quick thoughts:</p>
  <ol>
  <li>upgrade to Webform CiviCRM 5.x (we’re no longer supporting 4.x)</li>
  </ol>
  <p>Edit: we have now officially disabled support for D7 - 4.x - you will now have a ‘unsupported version’ warning in your Drupal status report.</p>
  <ol start="2">
  <li><p>what is your PHP version?</p>
  </li>
  <li><p>always switch off notices on production sites: goto admin/config/developement/logging and set to -&gt; None</p>
  </li>
  <li><p>open an issue on our drupal.org webform_civicrm project page and give us exact steps to reproduce</p>
  </li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-20T15:43:04.717Z
Answers.Text: Thanks very much for the reply. Regarding point 1 - do you mean this version: https://www.drupal.org/project/webform_civicrm/releases/7.x-5.x-dev? Also I'm running PHP 7.2.21.
Answers.UserDisplayName: marksuk2004
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-20T17:53:27.370Z
Answers.Text: Still listed as 5.x-dev? Looking into that.
Answers.UserDisplayName: KarinG - Semper IT
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-21T08:08:25.930Z
Answers.Text: Yes it is. Great thanks. Look forward to hearing back.
Answers.UserDisplayName: marksuk2004
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-21T13:43:55.697Z
Answers.Text: Touched base with Coleman - we're keeping the 5.x.-dev until the remaining PRs in the queue (mostly API rewrites of direct DB queries) have been reviewed/tested. It's definitively what you want to be on from now on and going fwd.
Answers.UserDisplayName: KarinG - Semper IT
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-20T15:00:23.380Z
Answers.LastActivityDate: 2021-01-13T16:31:05.710Z
Answers.LastEditDate: 2021-01-13T16:31:05.710Z
Answers.UserDisplayName: KarinG - Semper IT
Body: <p>I’m using Webforms for CiviCRM 4.28 for a membership registration and payment form and have Pay Later set as the payment method. When the form is submitted I get the following errors shown on the confirmation screen once the form has been submitted.</p>
  
  <pre><code>Notice: Trying to get property 'tax_amount' of non-object in CRM_Contribute_BAO_Contribution::checkTaxAmount() (line 4272 of /xxxxxxxx/sites/all/modules/civicrm/CRM/Contribute/BAO/Contribution.php).
  Notice: Trying to get property 'total_amount' of non-object in CRM_Contribute_BAO_Contribution::checkTaxAmount() (line 4278 of /xxxxxxxx/sites/all/modules/civicrm/CRM/Contribute/BAO/Contribution.php).
  Notice: Trying to get property 'total_amount' of non-object in CRM_Contribute_BAO_Contribution::checkTaxAmount() (line 4279 of /xxxxxxxx/sites/all/modules/civicrm/CRM/Contribute/BAO/Contribution.php).
  Notice: Trying to get property 'fee_amount' of non-object in CRM_Contribute_BAO_Contribution::checkTaxAmount() (line 4278 of /xxxxxxxx/sites/all/modules/civicrm/CRM/Contribute/BAO/Contribution.php).
  Notice: Trying to get property 'fee_amount' of non-object in CRM_Contribute_BAO_Contribution::checkTaxAmount() (line 4279 of /xxxxxxxx/sites/all/modules/civicrm/CRM/Contribute/BAO/Contribution.php).
  </code></pre>
  
  <p>I have the Membership and Contribution tabs of the CiviCRM Webform panel set up as follows.
  <a href="https://i.sstatic.net/Q25TC.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Q25TC.png" alt="Webform Membership Panel"></a><a href="https://i.sstatic.net/qdQt7.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/qdQt7.png" alt="Webform Contribution Panel"></a>
  The payment screen looks fine and the message shows after the form has been submitted.
  <a href="https://i.sstatic.net/m3T8G.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/m3T8G.png" alt="Payment Screen"></a>
  <a href="https://i.sstatic.net/OZ6yL.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/OZ6yL.png" alt="Confirmation Screen (Showing Error)"></a>
  I’m running CiviCRM 5.16.2 against Drupal 7.67.</p>
  
  <p>Any ideas what could be causing this and how to resolve?</p>
  
Tags: <webform-civicrm><contributions><contribution-page>
Title: Property of non-object notice after submitting CiviCRM Webform with Contributions
ThreadText: # Property of non-object notice after submitting CiviCRM Webform with Contributions
  
  (Asked by: username_0 on 2019-08-20)
  
  I’m using Webforms for CiviCRM 4.28 for a membership registration and payment form and have Pay Later set as the payment method. When the form is submitted I get the following errors shown on the confirmation screen once the form has been submitted.
  
  ```
  Notice: Trying to get property 'tax_amount' of non-object in CRM_Contribute_BAO_Contribution::checkTaxAmount() (line 4272 of /xxxxxxxx/sites/all/modules/civicrm/CRM/Contribute/BAO/Contribution.php).
  Notice: Trying to get property 'total_amount' of non-object in CRM_Contribute_BAO_Contribution::checkTaxAmount() (line 4278 of /xxxxxxxx/sites/all/modules/civicrm/CRM/Contribute/BAO/Contribution.php).
  Notice: Trying to get property 'total_amount' of non-object in CRM_Contribute_BAO_Contribution::checkTaxAmount() (line 4279 of /xxxxxxxx/sites/all/modules/civicrm/CRM/Contribute/BAO/Contribution.php).
  Notice: Trying to get property 'fee_amount' of non-object in CRM_Contribute_BAO_Contribution::checkTaxAmount() (line 4278 of /xxxxxxxx/sites/all/modules/civicrm/CRM/Contribute/BAO/Contribution.php).
  Notice: Trying to get property 'fee_amount' of non-object in CRM_Contribute_BAO_Contribution::checkTaxAmount() (line 4279 of /xxxxxxxx/sites/all/modules/civicrm/CRM/Contribute/BAO/Contribution.php).
  
  ```
  
  I have the Membership and Contribution tabs of the CiviCRM Webform panel set up as follows.
  [![Webform Membership Panel](https://i.sstatic.net/Q25TC.png)](https://i.sstatic.net/Q25TC.png)[![Webform Contribution Panel](https://i.sstatic.net/qdQt7.png)](https://i.sstatic.net/qdQt7.png)
  The payment screen looks fine and the message shows after the form has been submitted.
  [![Payment Screen](https://i.sstatic.net/m3T8G.png)](https://i.sstatic.net/m3T8G.png)
  [![Confirmation Screen (Showing Error)](https://i.sstatic.net/OZ6yL.png)](https://i.sstatic.net/OZ6yL.png)
  I’m running CiviCRM 5.16.2 against Drupal 7.67.
  
  Any ideas what could be causing this and how to resolve?
  
  **Tags:** webform-civicrm, contributions, contribution-page
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-08-20. Score: 0
  
  A couple of quick thoughts:
  
  1. upgrade to Webform CiviCRM 5.x (we’re no longer supporting 4.x)
  
  Edit: we have now officially disabled support for D7 - 4.x - you will now have a ‘unsupported version’ warning in your Drupal status report.
  
  2. what is your PHP version?
  3. always switch off notices on production sites: goto admin/config/developement/logging and set to -> None
  4. open an issue on our drupal.org webform\_civicrm project page and give us exact steps to reproduce
  
  > **Comments:**
  > **username_0**: Thanks very much for the reply. Regarding point 1 - do you mean this version: https://www.drupal.org/project/webform_civicrm/releases/7.x-5.x-dev? Also I'm running PHP 7.2.21.  
  > **username_1**: Still listed as 5.x-dev? Looking into that.  
  > **username_0**: Yes it is. Great thanks. Look forward to hearing back.  
  > **username_1**: Touched base with Coleman - we're keeping the 5.x.-dev until the remaining PRs in the queue (mostly API rewrites of direct DB queries) have been reviewed/tested. It's definitively what you want to be on from now on and going fwd.  
  
  ---
  
  