fix to whereIn to prevent invalid SQL being generated when no params are passed
This commit is contained in:
parent
7b453f1ab1
commit
f7d691a0aa
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user