From: Rob Richards Date: Fri, 18 Feb 2005 11:57:24 +0000 (+0000) Subject: Fragment must have associated document to append xml otherwise it is read-only X-Git-Tag: RELEASE_0_2_4~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b1157ff8d9d1db883a658c9883b6c02a183f3fd6;p=php Fragment must have associated document to append xml otherwise it is read-only --- 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) {