From a20a1d892663043c40b2ffd62135e6fd88f71c2c Mon Sep 17 00:00:00 2001 From: Thomas Leichtuss Date: Thu, 19 Nov 2015 10:18:42 +0100 Subject: [PATCH] fix for single value for multi-select-fields passed by the api-explorer --- CRM/Core/BAO/CustomField.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/CRM/Core/BAO/CustomField.php b/CRM/Core/BAO/CustomField.php index 6555a2dcf5..08ac5c9c02 100644 --- a/CRM/Core/BAO/CustomField.php +++ b/CRM/Core/BAO/CustomField.php @@ -1628,13 +1628,7 @@ SELECT id $customFields[$customFieldId]['html_type'] == 'AdvMulti-Select' ) { if ($value) { - // Note that only during merge this is not an array, - // and you can directly use value, CRM-4385 - if (is_array($value)) { - $value = CRM_Core_DAO::VALUE_SEPARATOR . implode(CRM_Core_DAO::VALUE_SEPARATOR, - array_values($value) - ) . CRM_Core_DAO::VALUE_SEPARATOR; - } + $value = CRM_Utils_Array::implodePadded($value); } else { $value = ''; -- 2.25.1