return empty array when passing empty as SQLvalue
parent
73c2415f83
commit
837d0ece7f
|
@ -98,9 +98,13 @@ class ZM_Object {
|
|||
if ( $value == null ) {
|
||||
$fields[] = '`'.$field.'` IS NULL';
|
||||
} else if ( is_array($value) ) {
|
||||
if ( count($value) ) {
|
||||
$func = function(){return '?';};
|
||||
$fields[] = '`'.$field.'` IN ('.implode(',', array_map($func, $value)). ')';
|
||||
$values += $value;
|
||||
} else {
|
||||
return array();
|
||||
}
|
||||
|
||||
} else {
|
||||
$fields[] = '`'.$field.'`=?';
|
||||
|
|
Loading…
Reference in New Issue