Merge pull request #23542 from owncloud/catch-empty-app-path-oh-we-really-should-use-exceptions-in-the-future
getAppPath can return false
This commit is contained in:
commit
789df4d630
|
@ -95,9 +95,12 @@ class Router implements IRouter {
|
||||||
if (!isset($this->routingFiles)) {
|
if (!isset($this->routingFiles)) {
|
||||||
$this->routingFiles = [];
|
$this->routingFiles = [];
|
||||||
foreach (\OC_APP::getEnabledApps() as $app) {
|
foreach (\OC_APP::getEnabledApps() as $app) {
|
||||||
$file = \OC_App::getAppPath($app) . '/appinfo/routes.php';
|
$appPath = \OC_App::getAppPath($app);
|
||||||
if (file_exists($file)) {
|
if($appPath !== false) {
|
||||||
$this->routingFiles[$app] = $file;
|
$file = $appPath . '/appinfo/routes.php';
|
||||||
|
if (file_exists($file)) {
|
||||||
|
$this->routingFiles[$app] = $file;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue