From 117b3e0a12e2397562eb737f01bf8793143db5e7 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Thu, 24 Mar 2016 09:19:43 +0100 Subject: [PATCH] getAppPath can return false Fixes https://github.com/owncloud/core/issues/23533 --- lib/private/route/router.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/private/route/router.php b/lib/private/route/router.php index 03bee3d203..ef02b5aba0 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; + } } } }