Skip to content

Commit

Permalink
Fixed issue #16917: Error when navigating to global settings and usin…
Browse files Browse the repository at this point in the history
…g PHP8

Dev PHP compatibility fixes
  • Loading branch information
c-schmitz committed Feb 16, 2021
1 parent 66f89f4 commit 52bdb90
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions application/models/ExtensionConfig.php
Expand Up @@ -151,9 +151,13 @@ public static function loadConfigFromFile($file)
if (!file_exists($file)) {
return null;
} else {
libxml_disable_entity_loader(false);
if (\PHP_VERSION_ID < 80000) {
libxml_disable_entity_loader(false);
}
$xml = simplexml_load_file(realpath($file));
libxml_disable_entity_loader(true);
if (\PHP_VERSION_ID < 80000) {
libxml_disable_entity_loader(true);
}
$config = new \ExtensionConfig($xml);
return $config;
}
Expand Down

0 comments on commit 52bdb90

Please sign in to comment.