port to 4.1 PHRAS-1831

This commit is contained in:
aina-esokia
2018-11-05 15:02:55 +04:00
parent e113d926c2
commit 2eeb1721e9
3 changed files with 5 additions and 3 deletions

View File

@@ -1217,7 +1217,7 @@ class databox extends base implements ThumbnailedElement
if ($domct !== false) {
$nodesToDel = [];
for($n = $domct->documentElement->firstChild; $n; $n = $n->nextSibling) {
if(!($n->getAttribute('delbranch'))){
if($n->nodeType == XML_ELEMENT_NODE && !($n->getAttribute('delbranch'))){
$nodesToDel[] = $n;
}
}