XMLReaderIterator icon indicating copy to clipboard operation
XMLReaderIterator copied to clipboard

Double self::next() call caused skipping first element in XMLReaderIterator class

Open pavel-ruban opened this issue 5 years ago • 2 comments

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.

pavel-ruban avatar May 07 '20 10:05 pavel-ruban

Hello @maintainers, I'm facing same issue and Pavel's solution solved it.

klepensky avatar Jul 10 '20 09:07 klepensky

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?

hakre avatar May 13 '22 19:05 hakre