mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-05 13:04:27 +02:00
Prevent use of empty filters in FilterChain::toQueryString()
Due to instantiation of filters using Filter::matchAll() in ObjectList::getFilter(), we get an empty FilterAnd instance when $this->filter is null. This prepends unnecessary separator '&' to the query string during conversion of filter to querystring. This breaks the state badge links for host and service lists.
This commit is contained in:
parent
c5cf7abf0d
commit
199ea6f965
@ -171,8 +171,10 @@ abstract class FilterChain extends Filter
|
||||
return '';
|
||||
}
|
||||
foreach ($this->filters() as $filter) {
|
||||
if (! $filter->isEmpty()) {
|
||||
$parts[] = $filter->toQueryString();
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: getLevel??
|
||||
if (strpos($this->getId(), '-')) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user