In case an app has issues while loading the app is disabled and request processing continues

This commit is contained in:
Thomas Müller 2016-04-20 18:02:37 +02:00
parent 6a6fc742dc
commit 7fea9974b7

View file

@ -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);
}
}
}
/**