rrichards               Thu Mar 17 08:11:48 2005 EDT

  Modified files:              (Branch: PHP_4_3)
    /php-src/ext/domxml php_domxml.c 
  Log:
  Fixed bug #32340 (insert_before($node,NULL) does not return)
  
http://cvs.php.net/diff.php/php-src/ext/domxml/php_domxml.c?r1=1.218.2.49&r2=1.218.2.50&ty=u
Index: php-src/ext/domxml/php_domxml.c
diff -u php-src/ext/domxml/php_domxml.c:1.218.2.49 
php-src/ext/domxml/php_domxml.c:1.218.2.50
--- php-src/ext/domxml/php_domxml.c:1.218.2.49  Fri Feb 25 17:13:08 2005
+++ php-src/ext/domxml/php_domxml.c     Thu Mar 17 08:11:47 2005
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_domxml.c,v 1.218.2.49 2005/02/25 22:13:08 rrichards Exp $ */
+/* $Id: php_domxml.c,v 1.218.2.50 2005/03/17 13:11:47 rrichards Exp $ */
 
 /* TODO
  * - Support Notation Nodes
@@ -2612,10 +2612,7 @@
                if (new_child == NULL)
                        new_child = xmlAddPrevSibling(refp, child);
        } else {
-               /* first unlink node, if child is already a child of parent
-                       for some strange reason, this is needed
-                */
-               if (child->parent == parent){
+               if (child->parent != NULL){
                        xmlUnlinkNode(child);
                }
                new_child = xmlAddChild(parent, child);

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

Reply via email to