From 34daab769e2ad84763e7c2a15010dec754691fea Mon Sep 17 00:00:00 2001 From: Mountev Date: Fri, 19 Jan 2018 18:37:41 +0000 Subject: [PATCH] CRM-21684 contact subtype fields prevent inclusion in profile/receipt email --- CRM/Core/BAO/UFGroup.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CRM/Core/BAO/UFGroup.php b/CRM/Core/BAO/UFGroup.php index 6ff7ded948..f2e64af801 100644 --- a/CRM/Core/BAO/UFGroup.php +++ b/CRM/Core/BAO/UFGroup.php @@ -1758,6 +1758,11 @@ AND ( entity_id IS NULL OR entity_id <= 0 ) if (CRM_Contact_BAO_ContactType::isaSubType($profileType)) { $profileType = CRM_Contact_BAO_ContactType::getBasicType($profileType); + + //in some cases getBasicType() returns a cached array instead of string. Example: array ('sponsor' => 'organization') + if (is_array($profileType)) { + $profileType = array_shift($profileType); + } } //allow special mix profiles for Contribution and Participant -- 2.25.1