Error on showing Smart Groups
CiviCRM-Version 5.10.3 MySQL-Version: 5.7.25 PHP-Version: 7.2
Usecase: Select a contact, select the "Groups" Tab, then click on the SmartGroups accordeon.
Error message:
Sorry an error occurred One of parameters (value: ) is not of the type CommaSeparatedIntegers
Debug message:
/sites/all/modules/contrib/civicrm/CRM/Utils/Type.php(554): CRM_Core_Error::fatal("One of parameters (value: ) is not of the type CommaSeparatedIntegers") /sites/all/modules/contrib/civicrm/CRM/Contact/BAO/Query.php(3255): CRM_Utils_Type::validate("", "CommaSeparatedIntegers")
The error appears in the function public function tag(&$values)
The delivered array for $values
is:
... (Array, 5 elements)
0 (String, 3 characters ) tag
1 (String, 8 characters ) IS EMPTY
2 (String, 0 characters )
3 (Integer) 1
4 (Integer) 0
The parameter $value
is set to $values[2]
, here an empty string.
I think the error than happens on line 3253:
// implode array, then remove all spaces and validate CommaSeparatedIntegers $value = CRM_Utils_Type::validate( str_replace(' ', '', implode(',', (array) $value)), 'CommaSeparatedIntegers' );
But as you can see in line 3289
if (in_array($op, array('IS NULL', 'IS NOT NULL', 'IS EMPTY', 'IS NOT EMPTY'))) {
$this->_where[$grouping][] = "({$etTable}.tag_id $op OR {$etCaseTable}.tag_id $op OR {$etActTable}.tag_id $op)";
}
the parameter $value
is not used anyway, so I think it is OK for it beeing empty.