From e11eeed71b2b2a352f7504b0a55a8bc48de29e06 Mon Sep 17 00:00:00 2001 From: Nishant Bhorodia Date: Thu, 3 Dec 2020 16:40:04 +0530 Subject: [PATCH] Issue#537: Fix syntax to check pcp_id is NULL in api params --- CRM/Contribute/Form/Contribution.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Contribute/Form/Contribution.php b/CRM/Contribute/Form/Contribution.php index d453df3a7c9e..3808fab0a184 100644 --- a/CRM/Contribute/Form/Contribution.php +++ b/CRM/Contribute/Form/Contribution.php @@ -1483,7 +1483,7 @@ protected function submit($submittedValues, $action, $pledgePaymentID) { $isEmpty = array_keys(array_flip($submittedValues['soft_credit_contact_id'])); if ($this->_id && count($isEmpty) == 1 && key($isEmpty) == NULL) { - civicrm_api3('ContributionSoft', 'get', ['contribution_id' => $this->_id, 'pcp_id' => NULL, 'api.ContributionSoft.delete' => 1]); + civicrm_api3('ContributionSoft', 'get', ['contribution_id' => $this->_id, 'pcp_id' => ['IS NULL' => 1], 'api.ContributionSoft.delete' => 1]); } // set the contact, when contact is selected