From dd819b17d867b287bc2d327823794b979dc63d67 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Thu, 15 Dec 2011 06:05:59 +0000 Subject: [PATCH] Fixed count method. --- flight/util/Collection.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/flight/util/Collection.php b/flight/util/Collection.php index 0c40a75..85d86bc 100644 --- a/flight/util/Collection.php +++ b/flight/util/Collection.php @@ -164,9 +164,7 @@ class Collection implements \ArrayAccess, \Iterator, \Countable { * @return int Collection size */ public function count() { - $count = iterator_count($this); - $this->rewind(); - return $count; + return sizeof($this->data); } /**