Fixed count method.

pull/11/head
Mike Cao 13 years ago
parent b70f831c0e
commit dd819b17d8

@ -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);
}
/**

Loading…
Cancel
Save