Merge branch 'PHP-8.2' into PHP-8.3

* PHP-8.2:
  Fix GH-16473: dom_import_simplexml stub is wrong
This commit is contained in:
Niels Dossche 2024-10-17 23:27:23 +02:00
commit c26d5f20e8
No known key found for this signature in database
GPG key ID: B8A8AD166DF0E2E5
4 changed files with 17 additions and 3 deletions

1
NEWS
View file

@ -24,6 +24,7 @@ PHP NEWS
. Add missing hierarchy checks to replaceChild. (nielsdos)
. Fixed bug GH-16336 (Attribute intern document mismanagement). (nielsdos)
. Fixed bug GH-16338 (Null-dereference in ext/dom/node.c). (nielsdos)
. Fixed bug GH-16473 (dom_import_simplexml stub is wrong). (nielsdos)
- EXIF:
. Fixed bug GH-16409 (Segfault in exif_thumbnail when not dealing with a

View file

@ -975,4 +975,4 @@ class DOMXPath
}
#endif
function dom_import_simplexml(object $node): DOMElement {}
function dom_import_simplexml(object $node): DOMAttr|DOMElement {}

View file

@ -1,7 +1,7 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: a20d21c1796ebb43028856f0ec2d53dcaded6cc0 */
* Stub hash: 4ce58367281bbbefffe2925d34830c717b6b4208 */
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_dom_import_simplexml, 0, 1, DOMElement, 0)
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_dom_import_simplexml, 0, 1, DOMAttr|DOMElement, 0)
ZEND_ARG_TYPE_INFO(0, node, IS_OBJECT, 0)
ZEND_END_ARG_INFO()

View file

@ -0,0 +1,13 @@
--TEST--
GH-16473 (dom_import_simplexml stub is wrong)
--EXTENSIONS--
dom
simplexml
--FILE--
<?php
$root = simplexml_load_string('<root xmlns:x="urn:x" x:attr="foo"/>');
$attr = $root->attributes('urn:x');
var_dump(dom_import_simplexml($attr)->textContent);
?>
--EXPECT--
string(3) "foo"