mirror of
https://github.com/php/php-src.git
synced 2024-11-25 19:05:31 +08:00
Fragment must have associated document to append xml otherwise it is read-only
This commit is contained in:
parent
e46e7309f8
commit
b1157ff8d9
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user