CRM-13833 - Further Changes
authorAtif Shaikh <shaikh388@gmail.com>
Mon, 14 Apr 2014 07:41:38 +0000 (13:11 +0530)
committerAtif Shaikh <shaikh388@gmail.com>
Mon, 14 Apr 2014 07:41:38 +0000 (13:11 +0530)
----------------------------------------
* CRM-13833: Implement Soft Credit Types
  https://issues.civicrm.org/jira/browse/CRM-13833

CRM/Utils/DeprecatedUtils.php

index 1c3849485c91ff9cd45c3501ebea78ef37effcf7..c7ba92afc800deeb9b684c72082b89b81316310a 100644 (file)
@@ -315,13 +315,13 @@ function _civicrm_api3_deprecated_formatted_param($params, &$values, $create = F
           //when update mode check contribution id or trxn id or
           //invoice id
           $contactId = new CRM_Contribute_DAO_Contribution();
-          if ($params['contribution_id']) {
+          if (!empty($params['contribution_id'])) {
             $contactId->id = $params['contribution_id'];
           }
-          elseif ($params['trxn_id']) {
+          elseif (!empty($params['trxn_id'])) {
             $contactId->trxn_id = $params['trxn_id'];
           }
-          elseif ($params['invoice_id']) {
+          elseif (!empty($params['invoice_id'])) {
             $contactId->invoice_id = $params['invoice_id'];
           }
           if ($contactId->find(TRUE)) {