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 * @return int Collection size
*/ */
public function count() { public function count() {
$count = iterator_count($this); return sizeof($this->data);
$this->rewind();
return $count;
} }
/** /**

Loading…
Cancel
Save