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

check file existance before autoloading

Even for our own namespace, file existance should be checked before
attempting to load it. Otherwise class_exist() check will throw errors.
parent 48555a30
No related branches found
No related tags found
No related merge requests found
......@@ -135,8 +135,11 @@ function load_autoload($name){
// our own namespace
if(substr($name, 0, 9) == 'dokuwiki/') {
require substr($name, 9) . '.php';
return true;
$file = DOKU_INC . 'inc/'. substr($name, 9) . '.php';
if(file_exists($file)) {
require $file;
return true;
}
}
// Plugin loading
......
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