filter: Fix whitespace sanitizing

This commit is contained in:
Eric Lippmann 2014-10-06 13:19:25 +02:00
parent d27d993395
commit 865ef76cb8
2 changed files with 2 additions and 2 deletions

View File

@ -131,8 +131,6 @@ abstract class 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);

View File

@ -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;