Files
php-src/ext/simplexml
Ilia Alshanetsky fc7a6b9007 [SimpleXML] Fix creating new attributes via attributes() dimension write
sxe_prop_dim_write() overwrote the element node with the first attribute
node when resolving an SXE_ITER_ATTRLIST iterator, so xmlNewProp() targeted
a non-element node and was skipped entirely when no attribute existed yet.
Keep the element node in place and resolve only the attribute list start,
so $x->attributes()["new"] = "v" creates the attribute like the symmetric
$x["new"] path; property writes on the attributes() object share the fixed
path while read/exists/unset handlers are unaffected by this defect.

Closes GH-23500
2026-08-30 11:03:49 -04:00
..
…