Improved plugin loading
This commit is contained in:
parent
9db3d31cc0
commit
7e6fd3ccc7
@ -26,8 +26,18 @@ class Plugins implements \SplSubject {
|
||||
|
||||
# Load plugins
|
||||
foreach ($this->files as $file) {
|
||||
|
||||
if ($file==='') continue;
|
||||
include(LYCHEE_PLUGINS . $file);
|
||||
|
||||
$file = LYCHEE_PLUGINS . $file;
|
||||
|
||||
if (file_exists($file)===false) {
|
||||
Log::warning($database, __METHOD__, __LINE__, 'Could not include plugin. File does not exist (' . $file . ').');
|
||||
continue;
|
||||
}
|
||||
|
||||
include($file);
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user