Commit 60c75928 authored by mattwire's avatar mattwire
Browse files

Fix #4 Fatal error when is_email_receipt = null.

parent 0948ee0b
......@@ -78,10 +78,15 @@ trait CRM_Core_Payment_MJWIPNTrait {
return (int) $this->is_email_receipt;
}
if (!empty($this->contribution_recur_id)) {
$this->is_email_receipt = civicrm_api3('ContributionRecur', 'getvalue', [
'return' => "is_email_receipt",
'id' => $this->contribution_recur_id,
]);
try {
$this->is_email_receipt = civicrm_api3('ContributionRecur', 'getvalue', [
'return' => "is_email_receipt",
'id' => $this->contribution_recur_id,
]);
}
catch (Exception $e) {
$this->is_email_receipt = 0;
}
}
return (int) $this->is_email_receipt;
}
......
......@@ -9,7 +9,7 @@ The extension is licensed under [AGPL-3.0](LICENSE.txt).
## Requirements
* PHP v7.2+
* CiviCRM 5.24+
* CiviCRM 5.28+
## Installation
......
......@@ -9,6 +9,10 @@ Releases use the following numbering system:
* **[BC]**: Items marked with [BC] indicate a breaking change that will require updates to your code if you are using that code in your extension.
## Release 0.9.5 (not yet released 2020-10-14)
* Fix [#4](https://lab.civicrm.org/extensions/mjwshared/-/issues/4) Fatal error when is_email_receipt = null.
## Release 0.9.4
* Fix [#2](https://lab.civicrm.org/extensions/mjwshared/-/issues/2) Don't update receive_date when marking a contribution as failed.
......
......@@ -14,9 +14,9 @@
<url desc="Release Notes">https://lab.civicrm.org/extensions/mjwshared/-/blob/master/docs/releasenotes.md</url>
<url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
</urls>
<releaseDate>2020-09-28</releaseDate>
<version>0.9.4</version>
<develStage>stable</develStage>
<releaseDate>2020-10-14</releaseDate>
<version>0.9.5-dev</version>
<develStage>beta</develStage>
<compatibility>
<ver>5.28</ver>
</compatibility>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment