From 7fea9974b7b3d0177678c5b577e10c930c13eb1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Wed, 20 Apr 2016 18:02:37 +0200 Subject: [PATCH] In case an app has issues while loading the app is disabled and request processing continues --- lib/private/app.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/private/app.php b/lib/private/app.php index 05d220f7d38..8a8b97d2cd4 100644 --- a/lib/private/app.php +++ b/lib/private/app.php @@ -159,8 +159,16 @@ class OC_App { * @param string $app app name */ private static function requireAppFile($app) { - // encapsulated here to avoid variable scope conflicts - require_once $app . '/appinfo/app.php'; + try { + // encapsulated here to avoid variable scope conflicts + require_once $app . '/appinfo/app.php'; + } catch (Error $ex) { + \OC::$server->getLogger()->logException($ex); + $blacklist = \OC::$server->getAppManager()->getAlwaysEnabledApps(); + if (!in_array($app, $blacklist)) { + self::disable($app); + } + } } /**