From 15b9f97ca41ce218a13b26fa5bbebaf64708dcdb Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Tue, 23 Apr 2013 16:48:14 -0400 Subject: [PATCH] Fixed typo in query builder and reverted changes to DbCache.php --- framework/caching/DbCache.php | 2 +- framework/db/QueryBuilder.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/caching/DbCache.php b/framework/caching/DbCache.php index befb523..dee8c7a 100644 --- a/framework/caching/DbCache.php +++ b/framework/caching/DbCache.php @@ -124,7 +124,7 @@ class DbCache extends Cache $query = new Query; $query->select(array('id', 'data')) ->from($this->cacheTable) - ->where(array('in', 'id', (array)$keys)) + ->where(array('id' => $keys)) ->andWhere('([[expire]] = 0 OR [[expire]] > ' . time() . ')'); if ($this->db->enableQueryCache) { diff --git a/framework/db/QueryBuilder.php b/framework/db/QueryBuilder.php index da43940..441d287 100644 --- a/framework/db/QueryBuilder.php +++ b/framework/db/QueryBuilder.php @@ -744,7 +744,7 @@ class QueryBuilder extends \yii\base\Object $parts = array(); foreach ($condition as $column => $value) { if (is_array($value)) { // IN condition - $parts[] = $this->buildInCondition('in', array($column, $value), $query); + $parts[] = $this->buildInCondition('in', array($column, $value), $params); } else { if (strpos($column, '(') === false) { $column = $this->db->quoteColumnName($column);