From 42827580232efa10db07676f0b3a9ed6093833bb Mon Sep 17 00:00:00 2001 From: zYne Date: Thu, 8 Feb 2007 18:26:05 +0000 Subject: [PATCH] fixed Doctrine_Query::count() --- lib/Doctrine/Query.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Doctrine/Query.php b/lib/Doctrine/Query.php index f75b72873..d28ee0f38 100644 --- a/lib/Doctrine/Query.php +++ b/lib/Doctrine/Query.php @@ -356,8 +356,7 @@ class Doctrine_Query extends Doctrine_Hydrate implements Countable { $params = array_merge($this->params, $params); - $a = $this->getConnection()->fetchOne($q, $params); - return $a[0]; + return (int) $this->getConnection()->fetchOne($q, $params); } /** * loadFields