mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-06 13:34:25 +02:00
SimpleQuery: Initialize self::$iteratorPosition as late as possible
refs #9632
This commit is contained in:
parent
6a17d7cb26
commit
dbc2f98053
@ -158,7 +158,7 @@ class SimpleQuery implements QueryInterface, Queryable, Iterator
|
||||
}
|
||||
|
||||
$this->iterator->rewind();
|
||||
$this->iteratorPosition = 0;
|
||||
$this->iteratorPosition = null;
|
||||
Benchmark::measure('Query result iteration started');
|
||||
}
|
||||
|
||||
@ -190,6 +190,8 @@ class SimpleQuery implements QueryInterface, Queryable, Iterator
|
||||
if (! $valid) {
|
||||
Benchmark::measure('Query result iteration finished');
|
||||
return false;
|
||||
} elseif ($this->iteratorPosition === null) {
|
||||
$this->iteratorPosition = 0;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user