From 1029f4e35b2acb1c0777f5f1ecdd4ded7058284c Mon Sep 17 00:00:00 2001 From: monishdeb Date: Wed, 15 Jul 2015 16:32:59 +0530 Subject: [PATCH] minor changes --- CRM/Core/BAO/Mapping.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CRM/Core/BAO/Mapping.php b/CRM/Core/BAO/Mapping.php index 00e8ac5147..607fabf8c8 100644 --- a/CRM/Core/BAO/Mapping.php +++ b/CRM/Core/BAO/Mapping.php @@ -1038,9 +1038,8 @@ class CRM_Core_BAO_Mapping extends CRM_Core_DAO_Mapping { // CRM-14983: verify if values are comma separated convert to array if (!is_array($value) && (strpos($value, ',') !== FALSE || strstr($value, '(')) && substr($fldName, 0, 7) != 'custom_' && $params['operator'][$key][$k] == 'IN') { - preg_match('#\((.*?)\)#', $value, $match); - $tmpArray = explode(',', $match[1]); - $value = array_combine(array_values($tmpArray), array_values($tmpArray)); + $value = explode(',', trim($value, "(..)")); + $value = array($params['operator'][$key][$k] => $value); } if ($row) { -- 2.25.1