Skip to content

Conversation

@nielsdos
Copy link
Member

Normally, simplexml cannot import document nodes,
but xsl allows to circumvent this.
A document does not have a name, so we return the empty string in that case.
While we could add an explicit check, we might as well switch the macro to a form that would be more optimal anyway as many tag names can be single characters.

The test was added in xsl because adding it in simplexml would break out-of-tree builds of simplexml.

Normally, simplexml cannot import document nodes,
but xsl allows to circumvent this.
A document does not have a name, so we return the empty string
in that case.
While we could add an explicit check, we might as well switch
the macro to a form that would be more optimal anyway as many
tag names can be single characters.

The test was added in xsl because adding it in simplexml would
break out-of-tree builds of simplexml.
@nielsdos nielsdos closed this in d94846c Sep 29, 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.

zend_string_init with NULL pointer in simplexml (UB)

2 participants