mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-15 10:14:55 +02:00
Add RuntimeException if xml, pdo or zip PHP extension is missing
For a better User Experience ;)
This commit is contained in:
@@ -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++) {
|
||||
|
Reference in New Issue
Block a user