Skip to content

Commit

Permalink
Comparison expressions need to traverse over their own _value property
Browse files Browse the repository at this point in the history
Comparisons where not traversing their _value property which was causing issues when comparing another expression.
  • Loading branch information
Walther Lalk committed Aug 8, 2014
1 parent 9cf4604 commit eba8c49
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Database/Expression/Comparison.php
Expand Up @@ -119,6 +119,17 @@ public function sql(ValueBinder $generator) {
return sprintf($template, $this->_field, $this->_conjunction, $value);
}

/**
* {@inheritDoc}
*
*/
public function traverse(callable $callable) {
if ($this->_value instanceof ExpressionInterface) {
$callable($this->_value);
$this->_value->traverse($callable);
}
}

/**
* Returns a template and a placeholder for the value after registering it
* with the placeholder $generator
Expand Down

0 comments on commit eba8c49

Please sign in to comment.