diff options
author | Andreas Gohr <andi@splitbrain.org> | 2012-05-20 09:44:46 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2012-05-20 09:46:22 +0200 |
commit | 5a9866e97863490816d932e98e8e170e49405d43 (patch) | |
tree | ab066ef488e4ea95a669d1c25ac65367b931a233 /inc/load.php | |
parent | ba6e9e9bd8c1ead8b4cd4afabf582b979b8b30e2 (diff) | |
download | rpg-5a9866e97863490816d932e98e8e170e49405d43.tar.gz rpg-5a9866e97863490816d932e98e8e170e49405d43.tar.bz2 |
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.
Diffstat (limited to 'inc/load.php')
-rw-r--r-- | inc/load.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/inc/load.php b/inc/load.php index 9f54034a3..7a410e452 100644 --- a/inc/load.php +++ b/inc/load.php @@ -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; } } |