knp-components: SolariumQuerySubscriber items iteration bug
Hi!
I think i’ve found bug in
\Knp\Component\Pager\Event\Subscriber\Paginate\SolariumQuerySubscriber::items
\Solarium\QueryType\Select\Result\Result::getIterator - returned \ArrayIterator object.
That’s why
\Knp\Component\Pager\Pagination\AbstractPagination::valid - always returned false, because key($this->items) where items is \ArrayIterator returned null.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 18
Commits related to this issue
- Added prototype of proposal for fix bug - https://github.com/KnpLabs/knp-components/issues/254 — committed to ekosogin/knp-components by ekosogin 4 years ago
Our team found that we were running into this issue after the update to PHP8, and it was breaking.
We so far have ended up applying this patch using https://github.com/cweagans/composer-patches
Sharing in case this helps someone with this issue or someone with the cycles to fix this.