add additional type check

This commit is contained in:
Georg Ehrke 2014-06-06 09:33:34 +02:00
parent 0fe8f77c17
commit 498aa66648
1 changed files with 1 additions and 1 deletions

View File

@ -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');