From b1157ff8d9d1db883a658c9883b6c02a183f3fd6 Mon Sep 17 00:00:00 2001 From: Rob Richards Date: Fri, 18 Feb 2005 11:57:24 +0000 Subject: [PATCH] Fragment must have associated document to append xml otherwise it is read-only --- ext/dom/documentfragment.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ext/dom/documentfragment.c b/ext/dom/documentfragment.c index c4501db30f..06797af443 100644 --- a/ext/dom/documentfragment.c +++ b/ext/dom/documentfragment.c @@ -123,6 +123,11 @@ PHP_METHOD(domdocumentfragment, appendXML) { 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) { -- 2.50.1