aboutsummaryrefslogtreecommitdiff
path: root/classes/iterators/IsisSubfieldIterator.php
diff options
context:
space:
mode:
Diffstat (limited to 'classes/iterators/IsisSubfieldIterator.php')
-rw-r--r--classes/iterators/IsisSubfieldIterator.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/classes/iterators/IsisSubfieldIterator.php b/classes/iterators/IsisSubfieldIterator.php
index 2e213cf..2bc57c0 100644
--- a/classes/iterators/IsisSubfieldIterator.php
+++ b/classes/iterators/IsisSubfieldIterator.php
@@ -60,7 +60,7 @@ class IsisSubfieldIterator implements Iterator
* Move forward to next element.
*/
function next() {
- if ($this->subfield >= $this->subfields) {
+ if ($this->subfield >= $this->subfields - 1) {
$this->subfield = 0;
++$this->row;
}
@@ -73,6 +73,6 @@ class IsisSubfieldIterator 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;
}
}