diff --git a/lib/autoloader.php b/lib/autoloader.php index da20a2a0250d05e57484a74c7fc6ae54d6332674..54f01d9be94f0f5de8333daf321be5d53982a183 100644 --- a/lib/autoloader.php +++ b/lib/autoloader.php @@ -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');