summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);
+ }
+ }
}
/**