Answers.Body: <p>Ah, v3 of this extension is incompatible with PHP7: <a href="https://github.com/compucorp/uk.co.compucorp.civicrm.giftaid/issues/49" rel="nofollow noreferrer">https://github.com/compucorp/uk.co.compucorp.civicrm.giftaid/issues/49</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-03T09:03:06.977Z
Answers.Text: That sounds like a bug and it is probably worth the report the bug at the extension github. And if you are a developer probably fix the bug. Or fund a developer to fix the bug for you.
Answers.UserDisplayName: Jaap Jansma - CiviCooP
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-02T21:05:04.623Z
Answers.LastActivityDate: 2018-05-02T21:05:04.623Z
Answers.UserDisplayName: dmgeurts
Answers.Body: <p>The developers are in the process of fixing this: see</p>
  
  <p><a href="https://github.com/compucorp/uk.co.compucorp.civicrm.giftaid/issues/49" rel="nofollow noreferrer">https://github.com/compucorp/uk.co.compucorp.civicrm.giftaid/issues/49</a></p>
  
  <p>So it will probably be fixed in the next release. If you need to install it sooner, here's how. Find your extension directory (go to <strong>Administer->SystemSettings->Directories</strong> and you will find the path in there. The abbreviation <code>[civicrm.files]</code> usually refers to <code>sites/default/files/civicrm</code>). IN your SSH or FTP environment, navigate to there and then open <code>uk.co.compucorp.civicrm.giftaid/CRM/Civigiftaid/Utils/Contribution.php</code> for editing. Find every line like this:</p>
  
  <pre><code>$batchContribution =&amp; new CRM_Batch_DAO_EntityBatch();
  </code></pre>
  
  <p>In each case, delete the line and replace it with these two lines:</p>
  
  <pre><code>$entityBatch = new CRM_Batch_DAO_EntityBatch();
  $batchContribution =&amp; $entityBatch;
  </code></pre>
  
  <p>This does not change what the code does but it just changes the syntax to make it compatible with PHP7.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-28T18:34:37.300Z
Answers.Text: I have done as you suggested above, but with no luck.
  When I try to install, I get the following error.. Parse error: syntax error, unexpected 'new' (T_NEW) in /homepages/21/d758583217/htdocs/health-e-learning/wp-content/uploads/civicrm/ext/uk.co.compucorp.civicrm.giftaid/CRM/Civigiftaid/Utils/Contribution.php on line 99 (If I have the Mailchimp Extension enabled, this gives an error too!) It would be great to know how to repair the damage if I can't use the Extension! Trying to install this extension has also damaged my frontpage too, it no longer looks the way it used too! Please help!
Answers.UserDisplayName: Jezzerisin
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-30T19:45:36.350Z
Answers.Text: Well, if you can't use the extension, just disable it; you should not have to repair anything. Also, if you have followed my answer then I don't see how you are getting that error. Can you post what line 99 of that file actually says? Ta.
Answers.UserDisplayName: naomi
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-09-14T16:57:31.187Z
Answers.LastActivityDate: 2018-09-14T16:57:31.187Z
Answers.UserDisplayName: naomi
Body: <p>Getting the following error when installing this extension. Had to enable PHP errors to get this as without all I see is a 500 server error w nothing in the Apache2 logs.</p>
  
  <pre><code>Parse error: syntax error, unexpected 'new' (T_NEW) in /var/www/website.vhost/web/wp-content/uploads/civicrm/ext/uk.co.compucorp.civicrm.giftaid-3.0.1/CRM/Civigiftaid/Utils/Contribution.php on line 99
  </code></pre>
  
Tags: <extension><gift-aid-extension>
Title: Can't install "CiviCRM UK GiftAid"
ThreadText: # Can't install "CiviCRM UK GiftAid"
  
  (Asked by: username_0 on 2018-05-02)
  
  Getting the following error when installing this extension. Had to enable PHP errors to get this as without all I see is a 500 server error w nothing in the Apache2 logs.
  
  ```
  Parse error: syntax error, unexpected 'new' (T_NEW) in /var/www/website.vhost/web/wp-content/uploads/civicrm/ext/uk.co.compucorp.civicrm.giftaid-3.0.1/CRM/Civigiftaid/Utils/Contribution.php on line 99
  
  ```
  
  **Tags:** extension, gift-aid-extension
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2018-05-02. Score: 4
  
  Ah, v3 of this extension is incompatible with PHP7: <https://github.com/compucorp/uk.co.compucorp.civicrm.giftaid/issues/49>
  
  > **Comments:**
  > **username_1**: That sounds like a bug and it is probably worth the report the bug at the extension github. And if you are a developer probably fix the bug. Or fund a developer to fix the bug for you.  
  
  ---
  
  ### Answer by username_2 on 2018-09-14. Score: 3
  
  The developers are in the process of fixing this: see
  
  <https://github.com/compucorp/uk.co.compucorp.civicrm.giftaid/issues/49>
  
  So it will probably be fixed in the next release. If you need to install it sooner, here's how. Find your extension directory (go to **Administer->SystemSettings->Directories** and you will find the path in there. The abbreviation `[civicrm.files]` usually refers to `sites/default/files/civicrm`). IN your SSH or FTP environment, navigate to there and then open `uk.co.compucorp.civicrm.giftaid/CRM/Civigiftaid/Utils/Contribution.php` for editing. Find every line like this:
  
  ```
  $batchContribution =& new CRM_Batch_DAO_EntityBatch();
  
  ```
  
  In each case, delete the line and replace it with these two lines:
  
  ```
  $entityBatch = new CRM_Batch_DAO_EntityBatch();
  $batchContribution =& $entityBatch;
  
  ```
  
  This does not change what the code does but it just changes the syntax to make it compatible with PHP7.
  
  > **Comments:**
  > **username_3**: I have done as you suggested above, but with no luck. When I try to install, I get the following error.. Parse error: syntax error, unexpected 'new' (T_NEW) in /homepages/21/d758583217/htdocs/health-e-learning/wp-content/uploads/civicrm/ext/uk.co.compucorp.civicrm.giftaid/CRM/Civigiftaid/Utils/Contribution.php on line 99 (If I have the Mailchimp Extension enabled, this gives an error too!) It would be great to know how to repair the damage if I can't use the Extension! Trying to install this extension has also damaged my frontpage too, it no longer looks the way it used too! Please help!  
  > **username_2**: Well, if you can't use the extension, just disable it; you should not have to repair anything. Also, if you have followed my answer then I don't see how you are getting that error. Can you post what line 99 of that file actually says? Ta.  
  
  ---
  
  