summaryrefslogtreecommitdiffstats
path: root/lib/private/route
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2016-03-24 09:19:43 +0100
committerLukas Reschke <lukas@owncloud.com>2016-03-24 09:19:43 +0100
commit117b3e0a12e2397562eb737f01bf8793143db5e7 (patch)
treeb861c3aa74e19e35fdb23126df93be90c0e145a9 /lib/private/route
parent4b3af9dfe781dc875f3bf94cd31e658ef1d707a9 (diff)
downloadnextcloud-server-117b3e0a12e2397562eb737f01bf8793143db5e7.tar.gz
nextcloud-server-117b3e0a12e2397562eb737f01bf8793143db5e7.zip
getAppPath can return false
Fixes https://github.com/owncloud/core/issues/23533
Diffstat (limited to 'lib/private/route')
-rw-r--r--lib/private/route/router.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/private/route/router.php b/lib/private/route/router.php
index 03bee3d2037..ef02b5aba0e 100644
--- a/lib/private/route/router.php
+++ b/lib/private/route/router.php
@@ -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;
+ }
}
}
}