Don't break OCC if an app is breaking in it's Application class
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
59752ce269
commit
3d9abee6f0
|
@ -113,6 +113,7 @@ class Coordinator {
|
|||
*/
|
||||
$appNameSpace = App::buildAppNamespace($appId);
|
||||
$applicationClassName = $appNameSpace . '\\AppInfo\\Application';
|
||||
try {
|
||||
if (class_exists($applicationClassName) && in_array(IBootstrap::class, class_implements($applicationClassName), true)) {
|
||||
try {
|
||||
/** @var IBootstrap|App $application */
|
||||
|
@ -121,14 +122,15 @@ class Coordinator {
|
|||
// Weird, but ok
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
$application->register($this->registrationContext->for($appId));
|
||||
}
|
||||
} catch (Throwable $e) {
|
||||
$this->logger->logException($e, [
|
||||
'message' => 'Error during app service registration: ' . $e->getMessage(),
|
||||
'level' => ILogger::FATAL,
|
||||
'app' => $appId,
|
||||
]);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -134,7 +134,15 @@ class OC_App {
|
|||
ob_start();
|
||||
foreach ($apps as $app) {
|
||||
if (!isset(self::$loadedApps[$app]) && ($types === [] || self::isType($app, $types))) {
|
||||
try {
|
||||
self::loadApp($app);
|
||||
} catch (\Throwable $e) {
|
||||
\OC::$server->getLogger()->logException($e, [
|
||||
'message' => 'Error during app loading: ' . $e->getMessage(),
|
||||
'level' => ILogger::FATAL,
|
||||
'app' => $app,
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
ob_end_clean();
|
||||
|
|
Loading…
Reference in New Issue