@@ -820,7 +820,7 @@ zend_result dom_node_text_content_write(dom_object *obj, zval *newval)
820
820
821
821
/* }}} */
822
822
823
- static xmlNodePtr _php_dom_insert_fragment (xmlNodePtr nodep , xmlNodePtr prevsib , xmlNodePtr nextsib , xmlNodePtr fragment , dom_object * intern , dom_object * childobj ) /* {{{ */
823
+ static xmlNodePtr _php_dom_insert_fragment (xmlNodePtr nodep , xmlNodePtr prevsib , xmlNodePtr nextsib , xmlNodePtr fragment , dom_object * intern ) /* {{{ */
824
824
{
825
825
xmlNodePtr newchild , node ;
826
826
@@ -845,8 +845,8 @@ static xmlNodePtr _php_dom_insert_fragment(xmlNodePtr nodep, xmlNodePtr prevsib,
845
845
node -> parent = nodep ;
846
846
if (node -> doc != nodep -> doc ) {
847
847
xmlSetTreeDoc (node , nodep -> doc );
848
- if ( node -> _private != NULL ) {
849
- childobj = node -> _private ;
848
+ dom_object * childobj = node -> _private ;
849
+ if ( childobj != NULL ) {
850
850
childobj -> document = intern -> document ;
851
851
php_libxml_increment_doc_ref ((php_libxml_node_object * )childobj , NULL );
852
852
}
@@ -973,7 +973,7 @@ PHP_METHOD(DOMNode, insertBefore)
973
973
}
974
974
} else if (child -> type == XML_DOCUMENT_FRAG_NODE ) {
975
975
xmlNodePtr last = child -> last ;
976
- new_child = _php_dom_insert_fragment (parentp , refp -> prev , refp , child , intern , childobj );
976
+ new_child = _php_dom_insert_fragment (parentp , refp -> prev , refp , child , intern );
977
977
dom_reconcile_ns_list (parentp -> doc , new_child , last );
978
978
} else {
979
979
new_child = xmlAddPrevSibling (refp , child );
@@ -1023,7 +1023,7 @@ PHP_METHOD(DOMNode, insertBefore)
1023
1023
}
1024
1024
} else if (child -> type == XML_DOCUMENT_FRAG_NODE ) {
1025
1025
xmlNodePtr last = child -> last ;
1026
- new_child = _php_dom_insert_fragment (parentp , parentp -> last , NULL , child , intern , childobj );
1026
+ new_child = _php_dom_insert_fragment (parentp , parentp -> last , NULL , child , intern );
1027
1027
dom_reconcile_ns_list (parentp -> doc , new_child , last );
1028
1028
} else {
1029
1029
new_child = xmlAddChild (parentp , child );
@@ -1104,7 +1104,7 @@ PHP_METHOD(DOMNode, replaceChild)
1104
1104
xmlUnlinkNode (oldchild );
1105
1105
1106
1106
xmlNodePtr last = newchild -> last ;
1107
- newchild = _php_dom_insert_fragment (nodep , prevsib , nextsib , newchild , intern , newchildobj );
1107
+ newchild = _php_dom_insert_fragment (nodep , prevsib , nextsib , newchild , intern );
1108
1108
if (newchild ) {
1109
1109
dom_reconcile_ns_list (nodep -> doc , newchild , last );
1110
1110
}
@@ -1262,7 +1262,7 @@ PHP_METHOD(DOMNode, appendChild)
1262
1262
php_dom_reconcile_attribute_namespace_after_insertion ((xmlAttrPtr ) new_child );
1263
1263
} else if (child -> type == XML_DOCUMENT_FRAG_NODE ) {
1264
1264
xmlNodePtr last = child -> last ;
1265
- new_child = _php_dom_insert_fragment (nodep , nodep -> last , NULL , child , intern , childobj );
1265
+ new_child = _php_dom_insert_fragment (nodep , nodep -> last , NULL , child , intern );
1266
1266
dom_reconcile_ns_list (nodep -> doc , new_child , last );
1267
1267
} else {
1268
1268
new_child = xmlAddChild (nodep , child );
0 commit comments