filter: Fix that leading and trailing whitespaces for columns and expressions let filters fail

Before, filtering for "host = localhost" issued "got invalid column host".
This commit is contained in:
Eric Lippmann 2014-10-01 03:13:27 +02:00
parent 1c7eb0d59a
commit 46078f50db
1 changed files with 2 additions and 0 deletions

View File

@ -131,6 +131,8 @@ abstract class Filter
public static function expression($col, $op, $expression)
{
$col = trim($col);
$expression = trim($expression);
switch ($op) {
case '=': return new FilterMatch($col, $op, $expression);
case '<': return new FilterLessThan($col, $op, $expression);