From f70d393bec9d9c60138e307aafaeaf74fe9a7264 Mon Sep 17 00:00:00 2001 From: Ian Wilson Date: Mon, 14 Feb 2022 12:06:09 -0500 Subject: [PATCH] dev/core#3066 - Add check for CiviPledge component Check that component is enabled before attempting to disconnect pledge payments from Failed / Cancelled contributions. --- CRM/Contribute/BAO/Contribution.php | 1 + 1 file changed, 1 insertion(+) diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index 45f2f87863..8851522c74 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -505,6 +505,7 @@ class CRM_Contribute_BAO_Contribution extends CRM_Contribute_DAO_Contribution { CRM_Contribute_BAO_ContributionSoft::processSoftContribution($params, $contribution); if (!empty($params['id']) && !empty($params['contribution_status_id']) + && CRM_Core_Component::isEnabled('CiviPledge') ) { self::disconnectPledgePaymentsIfCancelled((int) $params['id'], CRM_Core_PseudoConstant::getName('CRM_Contribute_BAO_Contribution', 'contribution_status_id', $params['contribution_status_id'])); } -- 2.25.1