cvs: php-src /ext/dom documentfragment.c
| From: | Rob Richards | Date: | Fri, 18 Feb 2005 11:57:24 +0000 |
| Subject: | cvs: php-src /ext/dom documentfragment.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-30477@lists.php.net to get a copy of this message | ||
rrichards Fri Feb 18 06:57:24 2005 EDT
Modified files:
/php-src/ext/dom documentfragment.c
Log:
Fragment must have associated document to append xml otherwise it is read-only
http://cvs.php.net/diff.php/php-src/ext/dom/documentfragment.c?r1=1.13&r2=1.14&ty=u
Index: php-src/ext/dom/documentfragment.c
diff -u php-src/ext/dom/documentfragment.c:1.13 php-src/ext/dom/documentfragment.c:1.14
--- php-src/ext/dom/documentfragment.c:1.13 Thu Oct 7 06:00:39 2004
+++ php-src/ext/dom/documentfragment.c Fri Feb 18 06:57:24 2005
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: documentfragment.c,v 1.13 2004/10/07 10:00:39 rrichards Exp $ */
+/* $Id: documentfragment.c,v 1.14 2005/02/18 11:57:24 rrichards Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -123,6 +123,11 @@
DOM_GET_OBJ(nodep, id, xmlNodePtr, intern);
+ if (dom_node_is_read_only(nodep) == SUCCESS) {
+ php_dom_throw_error(NO_MODIFICATION_ALLOWED_ERR, dom_get_strict_error(intern->document)
TSRMLS_CC);
+ RETURN_FALSE;
+ }
+
if (data) {
err = xmlParseBalancedChunkMemory(nodep->doc, NULL, NULL, 0, data, &lst);
if (err != 0) {