summaryrefslogtreecommitdiff
path: root/classes/pluginhost.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-08 12:14:12 +0300
committerAndrew Dolgov <[email protected]>2021-02-08 12:14:12 +0300
commit20b56b5b237a68d69218fea7fd9a8d1a4d1f2a0f (patch)
tree38c8cf2fe38b4e4117b63acca0b2f1616fcd1621 /classes/pluginhost.php
parent4165834f800dbcae058cd43f6dd627292558accf (diff)
pluginhost: catch errors while loading plugin source code
Diffstat (limited to 'classes/pluginhost.php')
-rwxr-xr-xclasses/pluginhost.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/classes/pluginhost.php b/classes/pluginhost.php
index 5df58e5d5..413fddeae 100755
--- a/classes/pluginhost.php
+++ b/classes/pluginhost.php
@@ -210,7 +210,12 @@ class PluginHost {
}
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")) {