diff --git a/ext/dom/php_dom.stub.php b/ext/dom/php_dom.stub.php index 955721dd230..7316f842669 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/php_dom_arginfo.h b/ext/dom/php_dom_arginfo.h index aee74f130e5..1878758671e 100644 --- a/ext/dom/php_dom_arginfo.h +++ b/ext/dom/php_dom_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 8bfa8e742552be6f1fb85593dcab2e755f1d5089 */ + * Stub hash: ebe9bcbd185e1973b5447beb306bd9d93051f415 */ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_dom_import_simplexml, 0, 1, DOMElement, 0) ZEND_ARG_TYPE_INFO(0, node, IS_OBJECT, 0) @@ -1581,7 +1581,7 @@ static zend_class_entry *register_class_DOMDocument(zend_class_entry *class_entr zend_string_release(property_documentURI_name); zval property_config_default_value; - ZVAL_NULL(&property_config_default_value); + ZVAL_UNDEF(&property_config_default_value); zend_string *property_config_name = zend_string_init("config", sizeof("config") - 1, 1); zend_declare_typed_property(class_entry, property_config_name, &property_config_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_ANY)); zend_string_release(property_config_name); diff --git a/ext/dom/tests/DOMDocument_json_encode.phpt b/ext/dom/tests/DOMDocument_json_encode.phpt new file mode 100644 index 00000000000..ed85ab4f210 --- /dev/null +++ b/ext/dom/tests/DOMDocument_json_encode.phpt @@ -0,0 +1,11 @@ +--TEST-- +JSON encoding a DOMDocument +--EXTENSIONS-- +dom +--FILE-- + +--EXPECT-- +{} diff --git a/ext/dom/tests/domobject_debug_handler.phpt b/ext/dom/tests/domobject_debug_handler.phpt index 70127b55167..98a9a72315a 100644 --- a/ext/dom/tests/domobject_debug_handler.phpt +++ b/ext/dom/tests/domobject_debug_handler.phpt @@ -17,8 +17,6 @@ var_dump($d); --EXPECTF-- Deprecated: Creation of dynamic property DOMDocument::$dynamicProperty is deprecated in %s on line %d object(DOMDocument)#1 (41) { - ["config"]=> - NULL ["dynamicProperty"]=> object(stdClass)#2 (0) { } @@ -46,6 +44,8 @@ object(DOMDocument)#1 (41) { bool(true) ["documentURI"]=> string(%d) %s + ["config"]=> + NULL ["formatOutput"]=> bool(false) ["validateOnParse"]=>