mirror of
https://github.com/Icinga/icingaweb2.git
synced 2026-05-28 04:02:39 -04: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
4 changed files with 16 additions and 0 deletions
|
|
@ -7,6 +7,10 @@ class FilterEqual extends FilterExpression
|
|||
{
|
||||
public function matches($row)
|
||||
{
|
||||
if (! isset($row->{$this->column})) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return (string) $row->{$this->column} === (string) $this->expression;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,10 @@ class FilterEqualOrGreaterThan extends FilterExpression
|
|||
{
|
||||
public function matches($row)
|
||||
{
|
||||
if (! isset($row->{$this->column})) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return (string) $row->{$this->column} >= (string) $this->expression;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,10 @@ class FilterEqualOrLessThan extends FilterExpression
|
|||
|
||||
public function matches($row)
|
||||
{
|
||||
if (! isset($row->{$this->column})) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return (string) $row->{$this->column} <= (string) $this->expression;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,10 @@ class FilterLessThan extends FilterExpression
|
|||
|
||||
public function matches($row)
|
||||
{
|
||||
if (! isset($row->{$this->column})) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return (string) $row->{$this->column} < (string) $this->expression;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue