Skip to content
Snippets Groups Projects
Commit 498aa666 authored by Georg Ehrke's avatar Georg Ehrke
Browse files

add additional type check

parent 0fe8f77c
No related branches found
No related tags found
No related merge requests found
......@@ -90,7 +90,7 @@ class Autoloader {
list(, $app, $rest) = explode('\\', $class, 3);
$app = strtolower($app);
$appPath = \OC_App::getAppPath($app);
if (stream_resolve_include_path($appPath)) {
if ($appPath && stream_resolve_include_path($appPath)) {
$paths[] = $appPath . '/' . strtolower(str_replace('\\', '/', $rest) . '.php');
// If not found in the root of the app directory, insert '/lib' after app id and try again.
$paths[] = $appPath . '/lib/' . strtolower(str_replace('\\', '/', $rest) . '.php');
......
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