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