From 03df80cf3902201661f68ecd91fe6eefd7d02042 Mon Sep 17 00:00:00 2001 From: "deb.monish" Date: Fri, 9 Jun 2017 14:27:43 +0530 Subject: [PATCH] CRM-20706: Notice error on using Contribution.getfield API --- api/v3/Contribution.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/v3/Contribution.php b/api/v3/Contribution.php index 547b9f180f7a..c3f683c827ef 100644 --- a/api/v3/Contribution.php +++ b/api/v3/Contribution.php @@ -356,7 +356,7 @@ function _civicrm_api3_contribution_get_spec(&$params) { $params['financial_type_id']['api.aliases'] = array('contribution_type_id'); $params['payment_instrument_id']['api.aliases'] = array('contribution_payment_instrument', 'payment_instrument'); - $params['contact_id'] = $params['contribution_contact_id']; + $params['contact_id'] = CRM_Utils_Array::value('contribution_contact_id', $params); $params['contact_id']['api.aliases'] = array('contribution_contact_id'); unset($params['contribution_contact_id']); }