aboutsummaryrefslogtreecommitdiff
path: root/classes/iterators/IsisMainItemIterator.php
diff options
context:
space:
mode:
Diffstat (limited to 'classes/iterators/IsisMainItemIterator.php')
-rw-r--r--classes/iterators/IsisMainItemIterator.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/classes/iterators/IsisMainItemIterator.php b/classes/iterators/IsisMainItemIterator.php
index 2c1784a..7db95ef 100644
--- a/classes/iterators/IsisMainItemIterator.php
+++ b/classes/iterators/IsisMainItemIterator.php
@@ -48,7 +48,9 @@ class IsisMainItemIterator implements Iterator
*/
function current() {
$field = $this->class->getMainItemName($this->field);
- return $this->valueset[$this->row][$field];
+ if (isset($this->valueset[$this->row])) {
+ return $this->valueset[$this->row][$field];
+ }
}
/**
@@ -65,7 +67,7 @@ class IsisMainItemIterator implements Iterator
* Check if there are more rows.
*/
function has_more_rows() {
- return $this->row < $this->rows - 1;
+ return $this->row < $this->rows;
}
/**