Skip to content

Commit

Permalink
filter: Fix whitespace sanitizing
Browse files Browse the repository at this point in the history
  • Loading branch information
lippserd committed Oct 6, 2014
1 parent d27d993 commit 865ef76
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions library/Icinga/Data/Filter/Filter.php
Expand Up @@ -131,8 +131,6 @@ public static function where($col, $filter)

public static function expression($col, $op, $expression)
{
$col = trim($col);
$expression = is_array($expression) ? array_map('trim', $expression) : trim($expression);
switch ($op) {
case '=': return new FilterMatch($col, $op, $expression);
case '<': return new FilterLessThan($col, $op, $expression);
Expand Down
2 changes: 2 additions & 0 deletions library/Icinga/Data/Filter/FilterExpression.php
Expand Up @@ -12,6 +12,8 @@ class FilterExpression extends Filter

public function __construct($column, $sign, $expression)
{
$column = trim($column);
$expression = is_array($expression) ? array_map('trim', $expression) : trim($expression);
$this->column = $column;
$this->sign = $sign;
$this->expression = $expression;
Expand Down

0 comments on commit 865ef76

Please sign in to comment.