Commit f7d691a0 authored by pookey's avatar pookey

fix to whereIn to prevent invalid SQL being generated when no params are passed

parent 7b453f1a
......@@ -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) {
......
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