diff --git a/system/init.php b/system/init.php index 41cfb053..25d12427 100644 --- a/system/init.php +++ b/system/init.php @@ -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)) diff --git a/system/libs/plugins.php b/system/libs/plugins.php index 700f451c..c757cd98 100644 --- a/system/libs/plugins.php +++ b/system/libs/plugins.php @@ -93,6 +93,10 @@ class Plugins { public static function install($file) { global $db; + if(!\class_exists('ZipArchive')) { + throw new RuntimeException('Please install PHP zip extension. Plugins upload disabled until then.'); + } + $zip = new ZipArchive(); if($zip->open($file)) { for ($i = 0; $i < $zip->numFiles; $i++) { diff --git a/system/libs/pot/OTS.php b/system/libs/pot/OTS.php index 0a0a6c7f..d20d029c 100644 --- a/system/libs/pot/OTS.php +++ b/system/libs/pot/OTS.php @@ -366,9 +366,8 @@ class POT public function connect($params) { // checks if PDO extension is loaded - if( !extension_loaded('PDO') ) - { - throw new LogicException(); + if( !extension_loaded('PDO') ) { + throw new RuntimeException('Please install PHP pdo extension. MyAAC will not work without it.'); } $this->db = new OTS_DB_MySQL($params);