lib: Don't render empty filters to SQL
Else we are presented with syntax errors. fixes #9211
This commit is contained in:
parent
01b453eeb1
commit
83a6e85b5d
|
@ -166,12 +166,14 @@ class DbQuery extends SimpleQuery
|
|||
$parts[] = $filterPart;
|
||||
}
|
||||
}
|
||||
if (! empty($parts)) {
|
||||
if ($level > 0) {
|
||||
$str .= ' (' . implode($op, $parts) . ') ';
|
||||
} else {
|
||||
$str .= implode($op, $parts);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$str .= $this->whereToSql($filter->getColumn(), $filter->getSign(), $filter->getExpression());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue