Icinga\Protocol\File\Reader::fetchPairs(): increase $index manually as the iterator's one makes trouble
refs #7060
This commit is contained in:
parent
e45f50408a
commit
ede5b8f0b9
|
@ -154,13 +154,15 @@ class Reader extends FilterIterator
|
|||
$skip = $count - ($skip + $read);
|
||||
}
|
||||
}
|
||||
foreach ($this as $index => $line) {
|
||||
$index = 0;
|
||||
foreach ($this as $line) {
|
||||
if ($index >= $skip) {
|
||||
if ($index >= $skip + $read) {
|
||||
break;
|
||||
}
|
||||
$lines[] = $line;
|
||||
}
|
||||
++$index;
|
||||
}
|
||||
if ($query->sortDesc()) {
|
||||
$lines = array_reverse($lines);
|
||||
|
|
Loading…
Reference in New Issue