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