Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-04-20 19:02:37 +0300
committerThomas Müller <thomas.mueller@tmit.eu>2016-04-20 19:02:37 +0300
commit7fea9974b7b3d0177678c5b577e10c930c13eb1e (patch)
tree78c53cbdd064641bb5e8254fb037aab118de9f78
parent6a6fc742dc736875a9d0a2be6891ba0fc635f1dc (diff)
In case an app has issues while loading the app is disabled and request processing continues
-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);
+ }
+ }
}
/**