getAppPath can return false

Fixes https://github.com/owncloud/core/issues/23533
This commit is contained in:
Lukas Reschke 2016-03-24 09:19:43 +01:00
parent c9eadb7b77
commit 0bb7644150
1 changed files with 6 additions and 3 deletions

View File

@ -95,9 +95,12 @@ class Router implements IRouter {
if (!isset($this->routingFiles)) {
$this->routingFiles = [];
foreach (\OC_APP::getEnabledApps() as $app) {
$file = \OC_App::getAppPath($app) . '/appinfo/routes.php';
if (file_exists($file)) {
$this->routingFiles[$app] = $file;
$appPath = \OC_App::getAppPath($app);
if($appPath !== false) {
$file = $appPath . '/appinfo/routes.php';
if (file_exists($file)) {
$this->routingFiles[$app] = $file;
}
}
}
}