From 896aaf9e68cdb7b31a20d4c6a0dd088ef8052c5c Mon Sep 17 00:00:00 2001 From: Stoob Date: Tue, 9 Feb 2016 21:28:50 -0800 Subject: [PATCH] CRM-17703 https://github.com/civicrm/civicrm-core/pull/7460/files --- CRM/Core/BAO/Mapping.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Core/BAO/Mapping.php b/CRM/Core/BAO/Mapping.php index 17a6924536..e3ca41e98b 100644 --- a/CRM/Core/BAO/Mapping.php +++ b/CRM/Core/BAO/Mapping.php @@ -614,11 +614,11 @@ class CRM_Core_BAO_Mapping extends CRM_Core_DAO_Mapping { $relationshipType->id = $id; if ($relationshipType->find(TRUE)) { $direction = "contact_sub_type_$second"; + $target_type = 'contact_type_' . $second; if (isset($relationshipType->$direction)) { $relatedFields = array_merge((array) $relatedMapperFields[$relationshipType->$direction], (array) $relationshipCustomFields); } - else { - $target_type = 'contact_type_' . $second; + elseif (isset($relationshipType->$target_type)) { $relatedFields = array_merge((array) $relatedMapperFields[$relationshipType->$target_type], (array) $relationshipCustomFields); } } -- 2.25.1