Change key setting in a loop

#531
This commit is contained in:
Karmalakas
2021-07-09 00:29:54 +03:00
committed by Matias Griese
parent c57a29c23f
commit 6dd5e0fd20

View File

@@ -152,7 +152,7 @@ class Collection extends Iterator implements PageCollectionInterface
{
reset($this->items);
while (key($this->items) !== $path && key($this->items) !== null) {
while (($key = key($this->items)) !== null && $key !== $path) {
next($this->items);
}
}