Browse Source

better conversion to array

tags/2.0.0-beta
Alexander Makarov 12 years ago
parent
commit
faaff8989c
  1. 8
      framework/db/dao/QueryBuilder.php

8
framework/db/dao/QueryBuilder.php

@ -566,9 +566,7 @@ class QueryBuilder extends \yii\base\Object
list($column, $values) = $operands; list($column, $values) = $operands;
if (!is_array($values)) { $values = (array)$values;
$values = array($values);
}
if ($values === array()) { if ($values === array()) {
return $operator === 'in' ? '0=1' : ''; return $operator === 'in' ? '0=1' : '';
@ -594,9 +592,7 @@ class QueryBuilder extends \yii\base\Object
list($column, $values) = $operands; list($column, $values) = $operands;
if (!is_array($values)) { $values = (array)$values;
$values = array($values);
}
if ($values === array()) { if ($values === array()) {
return $operator === 'like' || $operator === 'or like' ? '0=1' : ''; return $operator === 'like' || $operator === 'or like' ? '0=1' : '';

Loading…
Cancel
Save