Skip to content

Commit

Permalink
Merge pull request #10664 from jitendrapurohit/CRM-20875
Browse files Browse the repository at this point in the history
CRM-20875 - Fix membership import to avoid notice error to be thrown
  • Loading branch information
eileenmcnaughton authored Jul 24, 2017
2 parents 59a0b75 + 5981d15 commit 29a2319
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CRM/Member/Import/Parser/Membership.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,8 @@ public function import($onDuplicate, &$values) {
$session = CRM_Core_Session::singleton();
$dateType = $session->get('dateTypes');
$formatted = array();
$customFields = CRM_Core_BAO_CustomField::getFields(CRM_Utils_Array::value('contact_type', $params));
$customDataType = !empty($params['contact_type']) ? $params['contact_type'] : 'Membership';
$customFields = CRM_Core_BAO_CustomField::getFields($customDataType);

// don't add to recent items, CRM-4399
$formatted['skipRecentView'] = TRUE;
Expand Down

0 comments on commit 29a2319

Please sign in to comment.