diff options
-rw-r--r-- | NEWS | 15 | ||||
-rw-r--r-- | ext/dom/php_dom.c | 3 | ||||
-rw-r--r-- | ext/dom/tests/bug70558.phpt | 18 |
3 files changed, 23 insertions, 13 deletions
@@ -3,26 +3,17 @@ PHP NEWS 01 Oct 2015, PHP 7.0.0 RC 4 - Core: - . Fixed bug #70557 (Memleak on return type verifying failed). (Laruence) - . Fixed bug #70555 (fun_get_arg() on unsetted vars return UNKNOW). (Laruence) - . Fixed bug #70548 (Redundant information printed in case of uncaught engine - exception). (Laruence) - . Fixed bug #70547 (unsetting function variables corrupts backtrace). - (Laruence) . Fixed bug #70528 (assert() with instanceof adds apostrophes around class name). (Laruence) . Fixed bug #70481 (Memory leak in auto_global_copy_ctor() in ZTS build). (Laruence) -- FPM: - . Fixed bug #70538 ("php-fpm -i" crashes). (rainer dot jung at - kippdata dot de) - . Fixed bug #70279 (HTTP Authorization Header is sometimes passed to newer - reqeusts). (Laruence) +- DOM: + . Fixed bug #70558 ("Couldn't fetch" error in + DOMDocument::registerNodeClass()). (Laruence) - OpenSSL . Require at least OpenSSL version 0.9.8. (Jakub Zelenka) - . Fixed bug #68312 (Lookup for openssl.cnf causes a message box). (Anatol) - Session: . Fixed bug #70529 (Session read causes "String is not zero-terminated" error). diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c index 35900a5829..5510315bac 100644 --- a/ext/dom/php_dom.c +++ b/ext/dom/php_dom.c @@ -507,7 +507,6 @@ static zend_object *dom_objects_store_clone_obj(zval *zobject) /* {{{ */ dom_object *clone = dom_objects_set_class(intern->std.ce, 0); clone->std.handlers = dom_get_obj_handlers(); - zend_objects_clone_members(&clone->std, &intern->std); if (instanceof_function(intern->std.ce, dom_node_class_entry)) { xmlNodePtr node = (xmlNodePtr)dom_object_get_node(intern); @@ -528,6 +527,8 @@ static zend_object *dom_objects_store_clone_obj(zval *zobject) /* {{{ */ } } + zend_objects_clone_members(&clone->std, &intern->std); + return &clone->std; } /* }}} */ diff --git a/ext/dom/tests/bug70558.phpt b/ext/dom/tests/bug70558.phpt new file mode 100644 index 0000000000..c2d53d893d --- /dev/null +++ b/ext/dom/tests/bug70558.phpt @@ -0,0 +1,18 @@ +--TEST-- +Bug #70558 ("Couldn't fetch" error in DOMDocument::registerNodeClass()) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php + +class X extends \DOMDocument { + + public function __clone() { + var_dump($this->registerNodeClass('DOMDocument', 'X')); + } +} + +$dom = clone (new X()); +?> +--EXPECT-- +bool(true) |