Skip to content
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

Fix GH-12223: Entity reference produces infinite loop in var_dump/print_r #12223

Closed
wants to merge 1 commit into from

Conversation

nielsdos
Copy link
Member

No description provided.

Comment on lines +25 to +28
object(SimpleXMLElement)#1 (1) {
["c"]=>
object(SimpleXMLElement)#2 (1) {
["c"]=>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clearly those are different object but they "seem" identical?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This confused me too, but it is pre-existing behaviour and thus not something we can just change.
From an XML perspective it kind of makes sense: the declaration (second c) is a child of the reference (first c), etc. So that's why they show up like this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@nielsdos nielsdos self-assigned this Sep 16, 2023
@nielsdos nielsdos closed this in 39a9e56 Sep 16, 2023
nielsdos added a commit that referenced this pull request Sep 16, 2023
* PHP-8.1:
  Fix GH-12223: Entity reference produces infinite loop in var_dump/print_r
  Fix GH-12192: SimpleXML infinite loop when getName() is called within foreach
  Fix GH-12186: segfault copying/cloning a finalized HashContext
nielsdos added a commit that referenced this pull request Sep 16, 2023
* PHP-8.2:
  Fix GH-12223: Entity reference produces infinite loop in var_dump/print_r
  Fix GH-12192: SimpleXML infinite loop when getName() is called within foreach
  Fix GH-12186: segfault copying/cloning a finalized HashContext
nielsdos added a commit that referenced this pull request Sep 16, 2023
* PHP-8.3:
  Fix GH-12223: Entity reference produces infinite loop in var_dump/print_r
  Fix GH-12192: SimpleXML infinite loop when getName() is called within foreach
  Fix GH-12186: segfault copying/cloning a finalized HashContext
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants