Skip to content

Commit

Permalink
Fixed QueryBuiled in condition - force type casting to array
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverFire committed Aug 19, 2015
1 parent d28f178 commit 3d87c1a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use yii\base\InvalidParamException;
use yii\base\NotSupportedException;
use yii\helpers\Json;

/**
* QueryBuilder builds an HiActiveResource query based on the specification given as a [[Query]] object.
*/
Expand Down Expand Up @@ -135,8 +136,9 @@ private function buildBetweenCondition($operator, $operands)
private function buildInCondition($operator, $operands)
{
$key = array_shift($operands);
$value = array_shift($operands);

return [$key.'_in' => implode(',', array_shift($operands))];
return [$key.'_in' => (array)$value];
}

private function buildEqCondition ($operator, $operands) {
Expand Down

0 comments on commit 3d87c1a

Please sign in to comment.