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,7 +171,9 @@ abstract class FilterChain extends Filter
|
|||
return '';
|
||||
}
|
||||
foreach ($this->filters() as $filter) {
|
||||
$parts[] = $filter->toQueryString();
|
||||
if (! $filter->isEmpty()) {
|
||||
$parts[] = $filter->toQueryString();
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: getLevel??
|
||||
|
|
Loading…
Reference in New Issue