Skip to content
Snippets Groups Projects
Commit 8c13e5e6 authored by Prasad's avatar Prasad
Browse files

Fixes #1133 - Numeric Filter Single quote issue

parents 9807da70 416ee81a
No related branches found
No related tags found
No related merge requests found
......@@ -1154,12 +1154,8 @@ class QueryGenerator {
$value = "'$value'";
}
if($this->isNumericType($field->getFieldDataType())) {
if (empty($value)) {
$value = '0';
} else if (preg_match("/[^+\-0-9.]+/", $value)) {
$value = $db->quote($value);
}
if(($this->isNumericType($field->getFieldDataType())) && empty($value)) {
$value = '0';
}
$sql[] = "$sqlOperator $value";
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment