diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-04-20 18:02:37 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-04-20 18:02:37 +0200 |
commit | 7fea9974b7b3d0177678c5b577e10c930c13eb1e (patch) | |
tree | 78c53cbdd064641bb5e8254fb037aab118de9f78 /lib/private | |
parent | 6a6fc742dc736875a9d0a2be6891ba0fc635f1dc (diff) | |
download | nextcloud-server-7fea9974b7b3d0177678c5b577e10c930c13eb1e.tar.gz nextcloud-server-7fea9974b7b3d0177678c5b577e10c930c13eb1e.zip |
In case an app has issues while loading the app is disabled and request processing continues
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/app.php | 12 |
1 files 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); + } + } } /** |