Skip to content
Snippets Groups Projects
Commit 20b56b5b authored by Andrew Dolgov's avatar Andrew Dolgov
Browse files

pluginhost: catch errors while loading plugin source code

parent 4165834f
No related branches found
No related tags found
No related merge requests found
...@@ -210,7 +210,12 @@ class PluginHost { ...@@ -210,7 +210,12 @@ class PluginHost {
} }
if (!isset($this->plugins[$class])) { if (!isset($this->plugins[$class])) {
if (file_exists($file)) require_once $file; try {
if (file_exists($file)) require_once $file;
} catch (Error $err) {
user_error($err, E_USER_WARNING);
continue;
}
if (class_exists($class) && is_subclass_of($class, "Plugin")) { if (class_exists($class) && is_subclass_of($class, "Plugin")) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment