XMLReaderIterator
XMLReaderIterator copied to clipboard
Double self::next() call caused skipping first element in XMLReaderIterator class
Fix issue with iteration when you never could select the first row as iterator logic had the bug with 2 next() calls invocations which lead to selection elements from array since 2nd element, we had many issues due to this in our migration implementation.
Hello @maintainers, I'm facing same issue and Pavel's solution solved it.
Thanks for the report, I've taken a look.
First of all, please note the XMLReaderItertor::skipNextRead() method added in v0.1.11, it may address the issue.
Otherwise I need some more details to reproduce first as I was not able to:
- Which XML do you have and how do you call the method?
- What is the code you're running that causes the behaviour?
- And which PHP version is this?