CRM-20566: Fatal error on submit of 'Edit Contribution'
authordeb.monish <monish.deb@jmaconsulting.biz>
Fri, 12 May 2017 18:44:56 +0000 (00:14 +0530)
committerdeb.monish <monish.deb@jmaconsulting.biz>
Fri, 12 May 2017 18:44:56 +0000 (00:14 +0530)
CRM/Contribute/Form/Contribution.php

index a383228cab961647e471ccc2586f0846bcef9d9d..b39bcaa728dea40bd00e759801f99b2cfef12f08 100644 (file)
@@ -1597,7 +1597,7 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP
 
     $isEmpty = array_keys(array_flip($submittedValues['soft_credit_contact_id']));
     if ($this->_id && count($isEmpty) == 1 && key($isEmpty) == NULL) {
-      civicrm_api3('ContributionSoft', 'get', array('contribution_id' => $this->_id, 'pcp_id' => 0, 'api.ContributionSoft.delete' => 1));
+      civicrm_api3('ContributionSoft', 'get', array('contribution_id' => $this->_id, 'pcp_id' => NULL, 'api.ContributionSoft.delete' => 1));
     }
 
     // set the contact, when contact is selected