summaryrefslogtreecommitdiffstats
path: root/lib/private/legacy/OC_App.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-05-05 10:41:18 +0200
committerJoas Schilling <coding@schilljs.com>2021-05-05 10:41:18 +0200
commit784b059a0132e0e8685a9993bd74d570a5b75ec6 (patch)
tree723727b4159b85eb65717b86f107ae7bf5a1f4ed /lib/private/legacy/OC_App.php
parent6d3aef1849eb84d423be2a8789bb13f6ef5a26a3 (diff)
downloadnextcloud-server-784b059a0132e0e8685a9993bd74d570a5b75ec6.tar.gz
nextcloud-server-784b059a0132e0e8685a9993bd74d570a5b75ec6.zip
Don't break OCC if an app is breaking in it's Application class
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/legacy/OC_App.php')
-rw-r--r--lib/private/legacy/OC_App.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/private/legacy/OC_App.php b/lib/private/legacy/OC_App.php
index 65365c85e36..ed85253b649 100644
--- a/lib/private/legacy/OC_App.php
+++ b/lib/private/legacy/OC_App.php
@@ -135,7 +135,14 @@ class OC_App {
ob_start();
foreach ($apps as $app) {
if (!isset(self::$loadedApps[$app]) && ($types === [] || self::isType($app, $types))) {
- self::loadApp($app);
+ try {
+ self::loadApp($app);
+ } catch (\Throwable $e) {
+ \OC::$server->get(LoggerInterface::class)->emergency('Error during app loading: ' . $e->getMessage(), [
+ 'exception' => $e,
+ 'app' => $app,
+ ]);
+ }
}
}
ob_end_clean();