Commit 5f1a4074 authored by zYne's avatar zYne

--no commit message

--no commit message
parent fb8498e0
...@@ -530,7 +530,11 @@ class Doctrine_Query extends Doctrine_Hydrate implements Countable { ...@@ -530,7 +530,11 @@ class Doctrine_Query extends Doctrine_Hydrate implements Countable {
} }
$field = $this->getShortAlias($table->getTableName()) . '.' . $table->getIdentifier(); $field = $this->getShortAlias($table->getTableName()) . '.' . $table->getIdentifier();
array_unshift($this->parts['where'], $field. ' IN (' . $subquery . ')');
// only append the subquery if it actually contains something
if($subquery !== '')
array_unshift($this->parts['where'], $field. ' IN (' . $subquery . ')');
$modifyLimit = false; $modifyLimit = false;
} }
} }
...@@ -594,7 +598,7 @@ class Doctrine_Query extends Doctrine_Hydrate implements Countable { ...@@ -594,7 +598,7 @@ class Doctrine_Query extends Doctrine_Hydrate implements Countable {
if( ! in_array($e[3], $this->subqueryAliases) && ! in_array($e[2], $this->subqueryAliases)) if( ! in_array($e[3], $this->subqueryAliases) && ! in_array($e[2], $this->subqueryAliases))
continue; continue;
} }
$subquery .= ' '.$part; $subquery .= ' '.$part;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment