mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 16:54:04 +02:00
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,10 +166,12 @@ class DbQuery extends SimpleQuery
|
|||||||
$parts[] = $filterPart;
|
$parts[] = $filterPart;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($level > 0) {
|
if (! empty($parts)) {
|
||||||
$str .= ' (' . implode($op, $parts) . ') ';
|
if ($level > 0) {
|
||||||
} else {
|
$str .= ' (' . implode($op, $parts) . ') ';
|
||||||
$str .= implode($op, $parts);
|
} else {
|
||||||
|
$str .= implode($op, $parts);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user