Skip to content

Commit c26d5f2

Browse files
committed
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: Fix GH-16473: dom_import_simplexml stub is wrong
2 parents 25817ad + 41af933 commit c26d5f2

File tree

4 files changed

+17
-3
lines changed

4 files changed

+17
-3
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ PHP NEWS
2424
. Add missing hierarchy checks to replaceChild. (nielsdos)
2525
. Fixed bug GH-16336 (Attribute intern document mismanagement). (nielsdos)
2626
. Fixed bug GH-16338 (Null-dereference in ext/dom/node.c). (nielsdos)
27+
. Fixed bug GH-16473 (dom_import_simplexml stub is wrong). (nielsdos)
2728

2829
- EXIF:
2930
. Fixed bug GH-16409 (Segfault in exif_thumbnail when not dealing with a

ext/dom/php_dom.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -975,4 +975,4 @@ public function registerPhpFunctions(string|array|null $restrict = null): void {
975975
}
976976
#endif
977977

978-
function dom_import_simplexml(object $node): DOMElement {}
978+
function dom_import_simplexml(object $node): DOMAttr|DOMElement {}

ext/dom/php_dom_arginfo.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/dom/tests/gh16473.phpt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
--TEST--
2+
GH-16473 (dom_import_simplexml stub is wrong)
3+
--EXTENSIONS--
4+
dom
5+
simplexml
6+
--FILE--
7+
<?php
8+
$root = simplexml_load_string('<root xmlns:x="urn:x" x:attr="foo"/>');
9+
$attr = $root->attributes('urn:x');
10+
var_dump(dom_import_simplexml($attr)->textContent);
11+
?>
12+
--EXPECT--
13+
string(3) "foo"

0 commit comments

Comments
 (0)