From 7789689274e0c38fcc5c4e09f94c4b8be5da5fba Mon Sep 17 00:00:00 2001 From: Philippe SAMPONT Date: Thu, 14 Jul 2016 13:04:48 +0200 Subject: [PATCH] CRM-19072 - Batch update custom fields for a contacts with 2 subtypes --- CRM/Contact/BAO/Contact.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/CRM/Contact/BAO/Contact.php b/CRM/Contact/BAO/Contact.php index 6266a44314..4711af7451 100644 --- a/CRM/Contact/BAO/Contact.php +++ b/CRM/Contact/BAO/Contact.php @@ -2239,12 +2239,7 @@ ORDER BY civicrm_email.is_primary DESC"; else { $type = $data['contact_type']; if (!empty($data['contact_sub_type'])) { - $type = $data['contact_sub_type']; - $type = CRM_Utils_Array::explodePadded($type); - // generally a contact even if, has multiple subtypes the parent-type is going to be one only - // and since formatCustomField() would be interested in parent type, lets consider only one subtype - // as the results going to be same. - $type = $type[0]; + $type = CRM_Utils_Array::explodePadded($data['contact_sub_type']); } } -- 2.25.1