From 5445ce73a38013223b002268d33a6a401dc176d3 Mon Sep 17 00:00:00 2001 From: Dave Jenkins Date: Mon, 16 May 2016 17:53:32 +0100 Subject: [PATCH] CRM-18559 - the value returned from validateSubTypeByEntity() does not include value separators, so they need to be added for the query. --- CRM/Core/BAO/CustomGroup.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CRM/Core/BAO/CustomGroup.php b/CRM/Core/BAO/CustomGroup.php index 9a4937e812..90c7685add 100644 --- a/CRM/Core/BAO/CustomGroup.php +++ b/CRM/Core/BAO/CustomGroup.php @@ -433,7 +433,9 @@ LEFT JOIN civicrm_custom_field ON (civicrm_custom_field.custom_group_id = civicr if (!empty($subTypes)) { foreach ($subTypes as $key => $subType) { - $subTypeClauses[] = "civicrm_custom_group.extends_entity_column_value LIKE '%" . self::validateSubTypeByEntity($entityType, $subType) . "%'"; + // CRM-18559: the value returned from validateSubTypeByEntity does not + // include value separators, so they need to be added for the query. + $subTypeClauses[] = "civicrm_custom_group.extends_entity_column_value LIKE '%" . CRM_Core_DAO::VALUE_SEPARATOR . self::validateSubTypeByEntity($entityType, $subType) . CRM_Core_DAO::VALUE_SEPARATOR . "%'"; } $subTypeClause = '(' . implode(' OR ', $subTypeClauses) . ')'; if (!$onlySubType) { -- 2.25.1