From 6621df607d014cf635283925136f7e0d6e45a09f Mon Sep 17 00:00:00 2001 From: yashodha Date: Fri, 29 Apr 2016 14:25:41 +0530 Subject: [PATCH] CRM-18484 : Error thrown in Reports if one of the params for in between filter is NULL ---------------------------------------- * 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 --- CRM/Report/Form.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Report/Form.php b/CRM/Report/Form.php index aa8fd77fdc..4f34d60dfe 100644 --- a/CRM/Report/Form.php +++ b/CRM/Report/Form.php @@ -1775,10 +1775,9 @@ class CRM_Report_Form extends CRM_Core_Form { 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 )"; } @@ -1787,6 +1786,7 @@ class CRM_Report_Form extends CRM_Core_Form { } } if ($max) { + $max = CRM_Utils_Type::escape($max, $type); if ($op == 'bw') { $clauses[] = "( {$field['dbAlias']} <= $max )"; } -- 2.25.1