Fix #16490 - [PHP 8.0] Function libxml_disable_entity_loader() is deprecated

Cherry-pick: 723c0095b9

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2020-12-12 17:24:56 +01:00
parent b8e4d932b7
commit cabe45f5a4
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889
2 changed files with 8 additions and 4 deletions

View File

@ -131,9 +131,11 @@ class ImportOds extends ImportPlugin
unset($data);
/**
* Disable loading of external XML entities.
* Disable loading of external XML entities for PHP versions below 8.0.
*/
libxml_disable_entity_loader();
if (PHP_VERSION_ID < 80000) {
libxml_disable_entity_loader();
}
/**
* Load the XML string

View File

@ -88,9 +88,11 @@ class ImportXml extends ImportPlugin
unset($data);
/**
* Disable loading of external XML entities.
* Disable loading of external XML entities for PHP versions below 8.0.
*/
libxml_disable_entity_loader();
if (PHP_VERSION_ID < 80000) {
libxml_disable_entity_loader();
}
/**
* Load the XML string