From 5dcb9417f33354495b2f00a620cb9a63197ad280 Mon Sep 17 00:00:00 2001 From: yashodha Date: Thu, 17 Dec 2015 15:07:25 +0530 Subject: [PATCH] CRM-17703: Enotices on export when relationship type using 'any contact type' exists ---------------------------------------- * CRM-17703: Enotices on export when relationship type using 'any contact type' exists https://issues.civicrm.org/jira/browse/CRM-17703 --- 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 3f4c8872f3..270c86408f 100644 --- a/CRM/Core/BAO/Mapping.php +++ b/CRM/Core/BAO/Mapping.php @@ -597,11 +597,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