Skip to content

Make cloning DOM node lists, maps, and collections fail #19089

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

This never worked and creates a broken object,
and on master can cause a crash with foreach.
It makes no sense to fix a behaviour that never worked, block it instead.

This never worked and creates a broken object,
and on master can cause a crash with foreach.
It makes no sense to fix a behaviour that never worked, block it
instead.
@nielsdos nielsdos requested a review from Girgias July 10, 2025 21:33
nielsdos added a commit to nielsdos/php-src that referenced this pull request Jul 10, 2025
This will be unnecessary once phpGH-19089 is merged because we always will
have a valid objmap object.
Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

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

Upgrading entry needs fixing but otherwise makes sense as I'm seeing the token list object also already disallows cloning.

Comment on lines +49 to +51
. Cloning a DOMNamedNodeMap, DOMNodeList, Dom\NamedNodeMap, Dom\NodeList,
Dom\HTMLCollection, and Dom\DtdNamedNodeMap. This never actually resulted
in a working object, so the impact should actually be zero.
Copy link
Member

Choose a reason for hiding this comment

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

Missing some words in the upgrading entry.

@nielsdos nielsdos closed this in e013b4a Jul 11, 2025
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