From e1d4b821116255c5e77f785ee6c80888e31649f5 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 7 Jul 2023 10:55:17 +0200 Subject: [PATCH] fix(CI): Fix type confusion with Psalm Signed-off-by: Joas Schilling --- apps/dav/lib/AppInfo/Application.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/dav/lib/AppInfo/Application.php b/apps/dav/lib/AppInfo/Application.php index 620f8d7e126..4ed68e68840 100644 --- a/apps/dav/lib/AppInfo/Application.php +++ b/apps/dav/lib/AppInfo/Application.php @@ -225,10 +225,12 @@ class Application extends App implements IBootstrap { }); $dispatcher->addListener('OC\AccountManager::userUpdated', function ($event) use ($container) { - $user = $event->getSubject(); - /** @var SyncService $syncService */ - $syncService = $container->query(SyncService::class); - $syncService->updateUser($user); + if ($event instanceof GenericEvent) { + $user = $event->getSubject(); + /** @var SyncService $syncService */ + $syncService = $container->query(SyncService::class); + $syncService->updateUser($user); + } }); -- 2.39.5