mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +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. (cherry picked from commit bbd36d5f83a29debbb4a72e79547ee7c4b35dbe0)
This commit is contained in:
parent
4aa22f1036
commit
d66a21031c
@ -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