$this->getIteratorInstance()->rewind();
// Then try to load all entries
- while ($this->getIteratorInstance()->next()) {
+ while ($this->getIteratorInstance()->valid()) {
+ // Go to next entry
+ $this->getIteratorInstance()->next();
+
// Get current entry
$current = $this->getIteratorInstance()->current();