|
@@ -165,9 +165,7 @@ abstract class CursorBasedIterator implements Iterator
|
|
*/
|
|
*/
|
|
public function next()
|
|
public function next()
|
|
{
|
|
{
|
|
- do {
|
|
|
|
- $more = false;
|
|
|
|
-
|
|
|
|
|
|
+ tryFetch: {
|
|
if (!$this->elements && $this->fetchmore) {
|
|
if (!$this->elements && $this->fetchmore) {
|
|
$this->fetch();
|
|
$this->fetch();
|
|
}
|
|
}
|
|
@@ -175,11 +173,11 @@ abstract class CursorBasedIterator implements Iterator
|
|
if ($this->elements) {
|
|
if ($this->elements) {
|
|
$this->extractNext();
|
|
$this->extractNext();
|
|
} elseif ($this->cursor) {
|
|
} elseif ($this->cursor) {
|
|
- $more = true;
|
|
|
|
|
|
+ goto tryFetch;
|
|
} else {
|
|
} else {
|
|
$this->valid = false;
|
|
$this->valid = false;
|
|
}
|
|
}
|
|
- } while ($more);
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|