mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-23 22:04:25 +02:00
Check if the column in the row is set for filters
When the column is not set for the filters undefined property exception is thrown in icinga-director. This is a quick fix to solve the issue.
This commit is contained in:
parent
83557afd35
commit
bbd36d5f83
@ -7,6 +7,10 @@ class FilterEqual extends FilterExpression
|
|||||||
{
|
{
|
||||||
public function matches($row)
|
public function matches($row)
|
||||||
{
|
{
|
||||||
|
if (! isset($row->{$this->column})) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return (string) $row->{$this->column} === (string) $this->expression;
|
return (string) $row->{$this->column} === (string) $this->expression;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,10 @@ class FilterEqualOrGreaterThan extends FilterExpression
|
|||||||
{
|
{
|
||||||
public function matches($row)
|
public function matches($row)
|
||||||
{
|
{
|
||||||
|
if (! isset($row->{$this->column})) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return (string) $row->{$this->column} >= (string) $this->expression;
|
return (string) $row->{$this->column} >= (string) $this->expression;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,10 @@ class FilterEqualOrLessThan extends FilterExpression
|
|||||||
|
|
||||||
public function matches($row)
|
public function matches($row)
|
||||||
{
|
{
|
||||||
|
if (! isset($row->{$this->column})) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return (string) $row->{$this->column} <= (string) $this->expression;
|
return (string) $row->{$this->column} <= (string) $this->expression;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,10 @@ class FilterLessThan extends FilterExpression
|
|||||||
|
|
||||||
public function matches($row)
|
public function matches($row)
|
||||||
{
|
{
|
||||||
|
if (! isset($row->{$this->column})) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return (string) $row->{$this->column} < (string) $this->expression;
|
return (string) $row->{$this->column} < (string) $this->expression;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user