diff options
| author | Rob Richards <rrichards@php.net> | 2005-02-18 11:57:24 +0000 |
|---|---|---|
| committer | Rob Richards <rrichards@php.net> | 2005-02-18 11:57:24 +0000 |
| commit | b1157ff8d9d1db883a658c9883b6c02a183f3fd6 (patch) | |
| tree | d7ec044bdf4e7424aebca68fb50d328ee8b7dced /ext/dom/documentfragment.c | |
| parent | e46e7309f8a6e5487c46700a0c2a0a7daa9b7cb3 (diff) | |
| download | php-git-b1157ff8d9d1db883a658c9883b6c02a183f3fd6.tar.gz | |
Fragment must have associated document to append xml otherwise it is read-only
Diffstat (limited to 'ext/dom/documentfragment.c')
| -rw-r--r-- | ext/dom/documentfragment.c | 5 |
1 files changed, 5 insertions, 0 deletions
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) { |
