rrichards               Sat Dec 30 15:41:17 2006 UTC

  Added files:                 (Branch: PHP_5_2)
    /php-src/ext/simplexml/tests        bug39760.phpt 

  Modified files:              
    /php-src/ext/simplexml      simplexml.c 
  Log:
  fix bug #39760 (cloning fails on nested SimpleXML-Object)
  add test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/simplexml.c?r1=1.151.2.22.2.18&r2=1.151.2.22.2.19&diff_format=u
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.151.2.22.2.18 
php-src/ext/simplexml/simplexml.c:1.151.2.22.2.19
--- php-src/ext/simplexml/simplexml.c:1.151.2.22.2.18   Wed Nov 29 22:53:26 2006
+++ php-src/ext/simplexml/simplexml.c   Sat Dec 30 15:41:17 2006
@@ -18,7 +18,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: simplexml.c,v 1.151.2.22.2.18 2006/11/29 22:53:26 tony2001 Exp $ */
+/* $Id: simplexml.c,v 1.151.2.22.2.19 2006/12/30 15:41:17 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1761,6 +1761,16 @@
                clone->document->refcount++;
                docp = clone->document->ptr;
        }
+
+       clone->iter.isprefix = sxe->iter.isprefix;
+       if (sxe->iter.name != NULL) {
+               clone->iter.name = xmlStrdup((xmlChar *)sxe->iter.name);
+       }
+       if (sxe->iter.nsprefix != NULL) {
+               clone->iter.nsprefix = xmlStrdup((xmlChar *)sxe->iter.nsprefix);
+       }
+       clone->iter.type = sxe->iter.type;
+
        if (sxe->node) {
                nodep = xmlDocCopyNode(sxe->node->node, docp, 1);
        }
@@ -2332,7 +2342,7 @@
 {
        php_info_print_table_start();
        php_info_print_table_header(2, "Simplexml support", "enabled");
-       php_info_print_table_row(2, "Revision", "$Revision: 1.151.2.22.2.18 $");
+       php_info_print_table_row(2, "Revision", "$Revision: 1.151.2.22.2.19 $");
        php_info_print_table_row(2, "Schema support",
 #ifdef LIBXML_SCHEMAS_ENABLED
                "enabled");

http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/tests/bug39760.phpt?view=markup&rev=1.1
Index: php-src/ext/simplexml/tests/bug39760.phpt
+++ php-src/ext/simplexml/tests/bug39760.phpt

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to