diff --git a/src/BatchQueryResult.php b/src/BatchQueryResult.php index 23f268959..3600a9c1d 100644 --- a/src/BatchQueryResult.php +++ b/src/BatchQueryResult.php @@ -107,7 +107,7 @@ public function next() if ($this->query->indexBy !== null) { $this->_key = key($this->_batch); } elseif (key($this->_batch) !== null) { - $this->_key++; + $this->_key = $this->_key === null ? 0 : $this->_key + 1; } else { $this->_key = null; }