improved error handling for plugins (if an error occur now in a plugin it always gets deactivated and maniacontrol directly restarted

This commit is contained in:
kremsy
2017-04-01 12:23:10 +02:00
parent 5abc3c3a16
commit 3e138a9065
3 changed files with 34 additions and 4 deletions

View File

@ -133,7 +133,10 @@ class PluginManager {
if (!$pluginClass) {
return false;
}
if (!$this->isPluginActive($pluginClass)) {
//If Error Occured while loading Plugin
$this->savePluginStatus($pluginClass, false);
return false;
}
@ -388,6 +391,7 @@ class PluginManager {
if ($this->isPluginActive($pluginClass)) {
return false;
}
/** @var Plugin $plugin */
$plugin = new $pluginClass();