diff --git a/NEWS b/NEWS index 5a69794db52a4..a0ea502c45a53 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,7 @@ PHP NEWS . Fix empty argument cases for DOMParentNode methods. (nielsdos) . Fixed bug GH-11791 (Wrong default value of DOMDocument::xmlStandalone). (nielsdos) + . Fix json_encode result on DOMDocument. (nielsdos) - Core: . Fixed oss-fuzz #60741 (Leak in open_basedir). (ilutov) diff --git a/ext/dom/php_dom.stub.php b/ext/dom/php_dom.stub.php index 955721dd230c0..7316f8426698b 100644 --- a/ext/dom/php_dom.stub.php +++ b/ext/dom/php_dom.stub.php @@ -707,7 +707,7 @@ class DOMDocument extends DOMNode implements DOMParentNode * @readonly * @deprecated */ - public mixed $config = null; + public mixed $config; public bool $formatOutput; diff --git a/ext/dom/tests/DOMDocument_json_encode.phpt b/ext/dom/tests/DOMDocument_json_encode.phpt new file mode 100644 index 0000000000000..ed85ab4f2109e --- /dev/null +++ b/ext/dom/tests/DOMDocument_json_encode.phpt @@ -0,0 +1,11 @@ +--TEST-- +JSON encoding a DOMDocument +--EXTENSIONS-- +dom +--FILE-- + +--EXPECT-- +{}