mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-07 05:54: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->iterator->rewind();
|
||||||
$this->iteratorPosition = 0;
|
$this->iteratorPosition = null;
|
||||||
Benchmark::measure('Query result iteration started');
|
Benchmark::measure('Query result iteration started');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -190,6 +190,8 @@ class SimpleQuery implements QueryInterface, Queryable, Iterator
|
|||||||
if (! $valid) {
|
if (! $valid) {
|
||||||
Benchmark::measure('Query result iteration finished');
|
Benchmark::measure('Query result iteration finished');
|
||||||
return false;
|
return false;
|
||||||
|
} elseif ($this->iteratorPosition === null) {
|
||||||
|
$this->iteratorPosition = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user