aboutsummaryrefslogtreecommitdiff
path: root/classes/iterators/IsisItemIterator.php
diff options
context:
space:
mode:
Diffstat (limited to 'classes/iterators/IsisItemIterator.php')
-rw-r--r--classes/iterators/IsisItemIterator.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/classes/iterators/IsisItemIterator.php b/classes/iterators/IsisItemIterator.php
index 9435146..f5ccd91 100644
--- a/classes/iterators/IsisItemIterator.php
+++ b/classes/iterators/IsisItemIterator.php
@@ -68,7 +68,7 @@ class IsisItemIterator implements Iterator
* Move forward to next element.
*/
function next() {
- if ($this->item >= $this->items) {
+ if ($this->item >= $this->items - 1) {
$this->item = 0;
++$this->row;
}
@@ -81,6 +81,6 @@ class IsisItemIterator implements Iterator
* Check if there is a current element after calls to rewind() or next().
*/
function valid() {
- return $this->row <= $this->rows;
+ return $this->row <= $this->rows - 1;
}
}