----------------------------------------
* CRM-18484: Error thrown in Reports if one of the params for in between filter is NULL
https://issues.civicrm.org/jira/browse/CRM-18484
if (($min !== NULL && strlen($min) > 0) ||
($max !== NULL && strlen($max) > 0)
) {
- $min = CRM_Utils_Type::escape($min, $type);
- $max = CRM_Utils_Type::escape($max, $type);
$clauses = array();
if ($min) {
+ $min = CRM_Utils_Type::escape($min, $type);
if ($op == 'bw') {
$clauses[] = "( {$field['dbAlias']} >= $min )";
}
}
}
if ($max) {
+ $max = CRM_Utils_Type::escape($max, $type);
if ($op == 'bw') {
$clauses[] = "( {$field['dbAlias']} <= $max )";
}