Skip to content

Fix GH-12208: SimpleXML infinite loop when a cast is used inside a foreach #12229

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

nielsdos
Copy link
Member

No description provided.

@nielsdos nielsdos linked an issue Sep 17, 2023 that may be closed by this pull request
@nielsdos nielsdos closed this in 486276f Sep 17, 2023
nielsdos added a commit that referenced this pull request Sep 30, 2023
Many methods in SimpleXML reset the iterator when called. This has the
consequence that mixing these operations with loops can cause infinite
loops, or the loss of iteration data.
Some people may however rely on the resetting behaviour. To prevent
unintended breaks in stable branches, let's only apply the fix to master.

This reverts GH-12193, GH-12229, GG-12247 for stable branches while
keeping them on master, adding a note in UPGRADING as well.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SimpleXML infinite loop when a cast is used inside a foreach
2 participants