]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(CI): Fix type confusion with Psalm 39190/head
authorJoas Schilling <coding@schilljs.com>
Fri, 7 Jul 2023 08:55:17 +0000 (10:55 +0200)
committerJoas Schilling <coding@schilljs.com>
Fri, 7 Jul 2023 08:55:17 +0000 (10:55 +0200)
Signed-off-by: Joas Schilling <coding@schilljs.com>
apps/dav/lib/AppInfo/Application.php

index 620f8d7e126cd40de54a620bb79c6bb0230a2033..4ed68e68840d08dd9c58d0848cd54da70c78b8d2 100644 (file)
@@ -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);
+                       }
                });