php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #46672
Patch simplexml-fix-xml-header-for-clone.patch revision 2010-04-05 01:46 UTC by compuart dot php at gmail dot com

Patch simplexml-fix-xml-header-for-clone.patch for SimpleXML related Bug #46672

Patch version 2010-04-05 01:46 UTC

Return to Bug #46672 | Download this patch
Patch Revisions:

Developer: compuart.php@gmail.com

Index: php-src-5.3/ext/simplexml/simplexml.c
===================================================================
--- php-src-5.3/ext/simplexml/simplexml.c	(revision 297468)
+++ php-src-5.3/ext/simplexml/simplexml.c	(working copy)
@@ -1954,6 +1954,10 @@
 
 	php_libxml_increment_node_ptr((php_libxml_node_object *)clone, nodep, NULL TSRMLS_CC);
 
+	if (clone->node) {
+		clone->node->node->parent = (xmlNodePtr)docp;
+	}
+
 	*clone_ptr = (void *) clone;
 }
 /* }}} */
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Nov 30 05:01:23 2020 UTC