diff --git a/ext/dom/php_dom.stub.php b/ext/dom/php_dom.stub.php index 45b54c21d6c2..bbf7bad0f149 100644 --- a/ext/dom/php_dom.stub.php +++ b/ext/dom/php_dom.stub.php @@ -433,7 +433,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 d63b43e9b95f..1be65cb75d16 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: a62e383b05df81ea245a7993215fb8ff4e1c7f9d */ + * Stub hash: 20a0ff883af3bbf073d9c8bc8246646ffafe7818 */ 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) @@ -1436,7 +1436,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 000000000000..ed85ab4f2109 --- /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 948fd547f4d5..97eb5fd9bba5 100644 --- a/ext/dom/tests/domobject_debug_handler.phpt +++ b/ext/dom/tests/domobject_debug_handler.phpt @@ -16,8 +16,6 @@ var_dump($d); ?> --EXPECTF-- object(DOMDocument)#1 (39) { - ["config"]=> - NULL ["dynamicProperty"]=> object(stdClass)#2 (0) { } @@ -45,6 +43,8 @@ object(DOMDocument)#1 (39) { bool(true) ["documentURI"]=> string(%d) %s + ["config"]=> + NULL ["formatOutput"]=> bool(false) ["validateOnParse"]=>