Commit 85417195b9c for php.net

commit 85417195b9c0c373861827675aa0c5401646c1af
Merge: 51581dd3715 fc7a6b90070
Author: Ilia Alshanetsky <ilia@ilia.ws>
Date:   Sun Aug 30 11:04:27 2026 -0400

    Merge branch 'PHP-8.4' into PHP-8.5

    * PHP-8.4:
      [SimpleXML] Fix creating new attributes via attributes() dimension write

diff --cc NEWS
index a5d2cfe2c03,546364fbc2c..220aa49869c
--- a/NEWS
+++ b/NEWS
@@@ -69,13 -71,23 +69,17 @@@ PH
      before re-attaching the bucket. (iliaal)
    . Fixed an out-of-bounds read when following a redirect response with an
      empty Location header. (iliaal)
 -  . Fixed a memory leak in array_merge_recursive() when the recursive merge of
 -    an object converted to an array fails. (David Carlier)
    . Fixed read buffer compaction in php_stream_filter_flush(). (crystarm)

+ - SimpleXML:
+   . Fixed writing to a dimension of the object returned by attributes() not
+     creating the attribute. (Ilia Alshanetsky)
+
  - Zip:
 +  . Fixed bug GH-17787 (ZipArchive stream stops reading early when the archive
 +    is freed while the stream is still open). (Eyüp Can Akman)
    . Fixed bug GH-23276 (ZipArchive subclass storing its own stream cannot be
      garbage collected). (Weilin Du, ndossche)
 -  . Fixed ZipArchive::extractTo() and ZipArchive::getFrom*() reporting success
 -    on corrupted entries. (David Carlier)
 -  . Fixed ZipArchive::getNameIndex() truncating the entry index to int.
 -    (David Carlier)
 -  . Fixed fstat() on a zip:// stream reporting success when the archive cannot
 -    be opened. (David Carlier)

  - SAPI:
    . Fixed fuzzer targets failing to build in isolation. (Mrmaxmeier)
diff --cc ext/simplexml/simplexml.c
index b51ee3509b7,44fdef5e12d..06c627963c8
--- a/ext/simplexml/simplexml.c
+++ b/ext/simplexml/simplexml.c
@@@ -437,9 -441,9 +437,8 @@@ long_dim
  	GET_NODE(sxe, node);

  	if (sxe->iter.type == SXE_ITER_ATTRLIST) {
 -		attribs = 1;
 -		elements = 0;
 +		access_mode = SXE_ACCESS_ATTRIBS;
- 		node = php_sxe_get_first_node_non_destructive(sxe, node);
- 		attr = (xmlAttrPtr)node;
+ 		attr = (xmlAttrPtr)php_sxe_get_first_node_non_destructive(sxe, node);
  		test = sxe->iter.name != NULL;
  	} else if (sxe->iter.type != SXE_ITER_CHILD) {
  		mynode = node;