forgotten condition for libxml_disable_entity_loader

This commit is contained in:
Libor M 2020-10-17 16:05:30 +02:00
parent 9c6cf6fdb6
commit 93579e90ef
1 changed files with 6 additions and 2 deletions

View File

@ -76,10 +76,14 @@ class XmlDocument
$this->file = $file; $this->file = $file;
$file = $this->path . '/' . $file; $file = $this->path . '/' . $file;
$orignalLibEntityLoader = libxml_disable_entity_loader(false); if (\PHP_VERSION_ID < 80000) {
$orignalLibEntityLoader = libxml_disable_entity_loader(false);
}
$this->dom = new \DOMDocument(); $this->dom = new \DOMDocument();
$this->dom->load($file); $this->dom->load($file);
libxml_disable_entity_loader($orignalLibEntityLoader); if (\PHP_VERSION_ID < 80000) {
libxml_disable_entity_loader($orignalLibEntityLoader);
}
return $this->dom; return $this->dom;
} }