Skip to content

Commit

Permalink
Issue#537: Fix syntax to check pcp_id is NULL in api params
Browse files Browse the repository at this point in the history
  • Loading branch information
nishant-bhorodia committed Dec 3, 2020
1 parent 7f76694 commit e11eeed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CRM/Contribute/Form/Contribution.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e11eeed

Please sign in to comment.