diff --git a/lib/Doctrine/Query/Abstract.php b/lib/Doctrine/Query/Abstract.php index 1454ffa91..011146397 100644 --- a/lib/Doctrine/Query/Abstract.php +++ b/lib/Doctrine/Query/Abstract.php @@ -1136,6 +1136,11 @@ abstract class Doctrine_Query_Abstract public function whereIn($expr, $params = array(), $not = false) { $params = (array) $params; + + // if there's no params, return (else we'll get a WHERE IN (), invalid SQL) + if (!count($params)) + return; + $a = array(); foreach ($params as $k => $value) { if ($value instanceof Doctrine_Expression) {