summaryrefslogtreecommitdiffstats
path: root/lib/private/app.php
diff options
context:
space:
mode:
authorThomas Müller <DeepDiver1975@users.noreply.github.com>2016-04-20 22:41:02 +0200
committerThomas Müller <DeepDiver1975@users.noreply.github.com>2016-04-20 22:41:02 +0200
commita061ef75ead3d5eb9fa5e713301b7452b3b12b73 (patch)
treeea758fc9cbf054e513e4358b63fc3b3a3a6d30b0 /lib/private/app.php
parent7e2a1656f9e9fbfda7835bf448a7c63100ab2378 (diff)
parent7fea9974b7b3d0177678c5b577e10c930c13eb1e (diff)
downloadnextcloud-server-a061ef75ead3d5eb9fa5e713301b7452b3b12b73.tar.gz
nextcloud-server-a061ef75ead3d5eb9fa5e713301b7452b3b12b73.zip
Merge pull request #24127 from owncloud/handle-app-loading-error
Handle app loading error
Diffstat (limited to 'lib/private/app.php')
-rw-r--r--lib/private/app.php12
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);
+ }
+ }
}
/**