Fragment must have associated document to append xml otherwise it is read-only

This commit is contained in:
Rob Richards 2005-02-18 11:57:24 +00:00
parent e46e7309f8
commit b1157ff8d9

View File

@ -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) {