Skip to content
Snippets Groups Projects
Commit 5a9866e9 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

do not surpress any errors when loading plugin files

When a plugin file exists, we can assume it is the correct file and load
it without error supression. This makes it much easier to detect and
debug problematic plugins.
parent ba6e9e9b
No related branches found
No related tags found
No related merge requests found
......@@ -96,11 +96,12 @@ function load_autoload($name){
// Plugin loading
if(preg_match('/^(helper|syntax|action|admin|renderer|remote)_plugin_([^_]+)(?:_([^_]+))?$/',
$name, $m)) {
//try to load the wanted plugin file
// include, but be silent. Maybe some other autoloader has an idea
// how to load this class.
// try to load the wanted plugin file
$c = ((count($m) === 4) ? "/{$m[3]}" : '');
@include DOKU_PLUGIN . "{$m[2]}/{$m[1]}$c.php";
$plg = DOKU_PLUGIN . "{$m[2]}/{$m[1]}$c.php";
if(@file_exists($plg)){
include DOKU_PLUGIN . "{$m[2]}/{$m[1]}$c.php";
}
return;
}
}
......
......@@ -169,7 +169,7 @@ class Doku_Plugin_Controller {
$plugins = array();
foreach($files as $file) {
if(file_exists($file)) {
@include_once($file);
include_once($file);
}
}
return $plugins;
......
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