Skip to content
Permalink
Browse files

Allow to use closure in QueryExpression

Allow to use closure in QueryExpression. Fixes #3852
  • Loading branch information...
MichalWadowski committed Jul 1, 2014
1 parent 0a566bd commit 184bbd440f0634f6e03b3e005a58f173b864834e
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/Database/Expression/QueryExpression.php
@@ -434,6 +434,11 @@ protected function _addConditions(array $conditions, array $types) {
if ($numericKey && empty($c)) {
continue;
}
if (is_callable($c)) {
$expr = new QueryExpression([], $typeMap);
$c = $c($expr, $this);
}
if ($numericKey && is_string($c)) {
$this->_conditions[] = $c;

0 comments on commit 184bbd4

Please sign in to comment.
You can’t perform that action at this time.