Add RuntimeException if xml, pdo or zip PHP extension is missing

For a better User Experience ;)
This commit is contained in:
slawkens
2020-02-15 17:17:28 +01:00
parent f005b7338f
commit 51b848c43e
3 changed files with 10 additions and 3 deletions

View File

@@ -131,6 +131,10 @@ if($cache->enabled() && $cache->fetch('vocations', $tmp)) {
$config['vocations'] = unserialize($tmp);
}
else {
if(!class_exists('DOMDocument')) {
throw new RuntimeException('Please install PHP xml extension. MyAAC will not work without it.');
}
$vocations = new DOMDocument();
$file = $config['data_path'] . 'XML/vocations.xml';
if(!@file_exists($file))