}
// 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));
+ if (strstr($params['operator'][$key][$k], 'IN') && !is_array($value) && (strpos($value, ',') !== FALSE || strstr($value, '(') || !empty($value)) && substr($fldName, 0, 7) != 'custom_') {
+ $value = explode(',', str_replace(array('(', ')'), '', $value));
}
if ($row) {