From ce1e46975118d1ae43605cf437b35de28f7c993f Mon Sep 17 00:00:00 2001 From: Alexander Kochetov Date: Sun, 1 Jun 2014 02:34:48 +0400 Subject: [PATCH] ActiveQuery::one() slight refactoring --- framework/db/ActiveQuery.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/framework/db/ActiveQuery.php b/framework/db/ActiveQuery.php index 69327989c4..023e63be1f 100644 --- a/framework/db/ActiveQuery.php +++ b/framework/db/ActiveQuery.php @@ -223,8 +223,7 @@ class ActiveQuery extends Query implements ActiveQueryInterface */ public function one($db = null) { - $command = $this->createCommand($db); - $row = $command->queryOne(); + $row = parent::one($db); if ($row !== false) { if ($this->asArray) { $model = $row;