Skip to content

Commit 8874384

Browse files
committed
Merge branch 'PHP-8.2'
* PHP-8.2: Fix json_encode result on DOMDocument
2 parents 04c820f + 82eda28 commit 8874384

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

ext/dom/php_dom.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ class DOMDocument extends DOMNode implements DOMParentNode
707707
* @readonly
708708
* @deprecated
709709
*/
710-
public mixed $config = null;
710+
public mixed $config;
711711

712712
public bool $formatOutput;
713713

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.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--TEST--
2+
JSON encoding a DOMDocument
3+
--EXTENSIONS--
4+
dom
5+
--FILE--
6+
<?php
7+
$doc = new DOMDocument;
8+
echo json_encode($doc);
9+
?>
10+
--EXPECT--
11+
{}

ext/dom/tests/domobject_debug_handler.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ var_dump($d);
1717
--EXPECTF--
1818
Deprecated: Creation of dynamic property DOMDocument::$dynamicProperty is deprecated in %s on line %d
1919
object(DOMDocument)#1 (41) {
20-
["config"]=>
21-
NULL
2220
["dynamicProperty"]=>
2321
object(stdClass)#2 (0) {
2422
}
@@ -46,6 +44,8 @@ object(DOMDocument)#1 (41) {
4644
bool(true)
4745
["documentURI"]=>
4846
string(%d) %s
47+
["config"]=>
48+
NULL
4949
["formatOutput"]=>
5050
bool(false)
5151
["validateOnParse"]=>

0 commit comments

Comments
 (0)