Handle nonexisting share provider registration

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2020-12-16 15:47:04 +01:00
parent 715ab2249b
commit 02237040d4
3 changed files with 14 additions and 3 deletions

View File

@@ -99,7 +99,9 @@ class Application20 extends App implements IBootstrap {
$context->injectFn(Closure::fromCallable([$this, 'registerCollaborationResources']));
$context->injectFn(function (IManager $shareManager) {
$shareManager->registerShareProvider(DeckShareProvider::class);
if (method_exists($shareManager, 'registerShareProvider')) {
$shareManager->registerShareProvider(DeckShareProvider::class);
}
});
$context->injectFn(function (Listener $listener, IEventDispatcher $eventDispatcher) {