mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Merge branch 'PHP-8.4'
* PHP-8.4: Fix GH-16473: dom_import_simplexml stub is wrong
This commit is contained in:
commit
b6f59d2a6b
3 changed files with 18 additions and 5 deletions
|
@ -1234,7 +1234,7 @@ namespace
|
|||
}
|
||||
#endif
|
||||
|
||||
function dom_import_simplexml(object $node): DOMElement {}
|
||||
function dom_import_simplexml(object $node): DOMAttr|DOMElement {}
|
||||
}
|
||||
|
||||
namespace Dom
|
||||
|
@ -2171,5 +2171,5 @@ namespace Dom
|
|||
}
|
||||
#endif
|
||||
|
||||
function import_simplexml(object $node): Element {}
|
||||
function import_simplexml(object $node): Attr|Element {}
|
||||
}
|
||||
|
|
6
ext/dom/php_dom_arginfo.h
generated
6
ext/dom/php_dom_arginfo.h
generated
|
@ -1,11 +1,11 @@
|
|||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: bc53676bcd060f8fd26ff6e92da4983e85c0eb83 */
|
||||
* Stub hash: 20c13a727cffb452475989a743ec29a8412a52f1 */
|
||||
|
||||
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()
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_Dom_import_simplexml, 0, 1, Dom\\Element, 0)
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_Dom_import_simplexml, 0, 1, Dom\\Attr|Dom\\Element, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, node, IS_OBJECT, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
|
|
13
ext/dom/tests/gh16473.phpt
Normal file
13
ext/dom/tests/gh16473.phpt
Normal 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"
|
Loading…
Add table
Add a link
Reference in a new issue