cvs: php4 /ext/domxml php_domxml.c

From: Date: Wed, 14 Aug 2002 16:12:18 +0000
Subject: cvs: php4 /ext/domxml php_domxml.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-13355@lists.php.net to get a copy of this message
chregu Wed Aug 14 12:12:18 2002 EDT Modified files: /php4/ext/domxml php_domxml.c Log: - fix for bug #17771 (insert_before misbeaviour (DOM L2 spec.)) @ - DomNode->insert_before behaves now according to W3C spec @ ie. new_child is moved, not copied. (chregu) Index: php4/ext/domxml/php_domxml.c diff -u php4/ext/domxml/php_domxml.c:1.189 php4/ext/domxml/php_domxml.c:1.190 --- php4/ext/domxml/php_domxml.c:1.189 Wed Aug 14 10:23:44 2002 +++ php4/ext/domxml/php_domxml.c Wed Aug 14 12:12:18 2002 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_domxml.c,v 1.189 2002/08/14 14:23:44 chregu Exp $ */ +/* $Id: php_domxml.c,v 1.190 2002/08/14 16:12:18 chregu Exp $ */ /* TODO * - Support Notation Nodes @@ -2453,19 +2453,14 @@ DOMXML_GET_OBJ(child, node, le_domxmlnodep); DOMXML_GET_OBJ(refp, ref, le_domxmlnodep); - if (NULL == (new_child = xmlCopyNode(child, 1))) { - php_error(E_WARNING, "%s(): unable to clone node", get_active_function_name(TSRMLS_C)); - RETURN_FALSE; - } + new_child = xmlAddPrevSibling(refp, child); - child = xmlAddPrevSibling(refp, new_child); - - if (NULL == child) { + if (NULL == new_child) { php_error(E_WARNING, "%s(): couldn't add newnode as the previous sibling of refnode", get_active_function_name(TSRMLS_C)); RETURN_FALSE; } - DOMXML_RET_OBJ(rv, child, &ret); + DOMXML_RET_OBJ(rv, new_child, &ret); } /* }}} */

« previous php.cvs (#13355) next »