[DI] Add null check for removeChild
This commit is contained in:
parent
2bccaaa9d1
commit
a5f05a0486
@ -324,7 +324,9 @@ class XmlFileLoader extends FileLoader
|
|||||||
$domElement->parentNode->replaceChild($tmpDomElement, $domElement);
|
$domElement->parentNode->replaceChild($tmpDomElement, $domElement);
|
||||||
$tmpDomElement->setAttribute('id', $id);
|
$tmpDomElement->setAttribute('id', $id);
|
||||||
} else {
|
} else {
|
||||||
$domElement->parentNode->removeChild($domElement);
|
if (null !== $domElement->parentNode) {
|
||||||
|
$domElement->parentNode->removeChild($domElement);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user