diff --git a/core/dbobjectset.class.php b/core/dbobjectset.class.php index 6d25134cf..6b10102d8 100644 --- a/core/dbobjectset.class.php +++ b/core/dbobjectset.class.php @@ -1063,7 +1063,12 @@ class DBObjectSet implements iDBObjectSetIterator $this->Load(); } - $this->m_iCurrRow = min($iRow, $this->Count()); + if ($iRow > 0) { + $this->m_iCurrRow = min($iRow, $this->Count()); + } else { + $this->m_iCurrRow = $iRow; + } + if ($this->m_iCurrRow < $this->m_iNumLoadedDBRows) { $this->m_oSQLResult->data_seek($this->m_iCurrRow); }