Merge pull request #25566 from nextcloud/fix/25359/followup

Fix remaining #25359
This commit is contained in:
Roeland Jago Douma 2021-02-10 18:02:24 +01:00 committed by GitHub
commit 847ee4041a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 9 deletions

View File

@ -271,10 +271,7 @@ class RegistrationContext {
}
public function registerTemplateProvider(string $appId, string $class): void {
$this->templateProviders[] = [
'appId' => $appId,
'class' => $class,
];
$this->templateProviders[] = new ServiceRegistration($appId, $class);
}
/**

View File

@ -709,12 +709,12 @@ class OC_App {
try {
/** @var IAlternativeLogin $provider */
$provider = \OC::$server->query($registration['class']);
$provider = \OC::$server->query($registration->getService());
} catch (QueryException $e) {
\OC::$server->getLogger()->logException($e, [
'message' => 'Alternative login option {option} can not be initialised.',
'option' => $registration['class'],
'app' => $registration['app'],
'option' => $registration->getService(),
'app' => $registration->getAppId(),
]);
}
@ -729,8 +729,8 @@ class OC_App {
} catch (Throwable $e) {
\OC::$server->getLogger()->logException($e, [
'message' => 'Alternative login option {option} had an error while loading.',
'option' => $registration['class'],
'app' => $registration['app'],
'option' => $registration->getService(),
'app' => $registration->getAppId(),
]);
}
}