summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xclasses/pluginhost.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/classes/pluginhost.php b/classes/pluginhost.php
index 173a75611..7688a6d0d 100755
--- a/classes/pluginhost.php
+++ b/classes/pluginhost.php
@@ -431,8 +431,20 @@ class PluginHost {
}
if (!isset($this->plugins[$class])) {
+
+ // WIP hack
+ // we can't catch incompatible method signatures via Throwable
+ // maybe also auto-disable user plugin in this situation? idk -fox
+ if ($_SESSION["plugin_blacklist.$class"] ?? false) {
+ user_error("Plugin $class has caused a PHP Fatal Error so it won't be loaded again in this session.", E_USER_NOTICE);
+ continue;
+ }
+
try {
+ $_SESSION["plugin_blacklist.$class"] = true;
require_once $file;
+ $_SESSION["plugin_blacklist.$class"] = false;
+
} catch (Error $err) {
user_error($err, E_USER_WARNING);
continue;