diff --git a/apps/dav/lib/Avatars/RootCollection.php b/apps/dav/lib/Avatars/RootCollection.php index c5e78624d4473..e88b29e02531c 100644 --- a/apps/dav/lib/Avatars/RootCollection.php +++ b/apps/dav/lib/Avatars/RootCollection.php @@ -24,6 +24,7 @@ */ namespace OCA\DAV\Avatars; +use OCP\IAvatarManager; use Sabre\DAVACL\AbstractPrincipalCollection; class RootCollection extends AbstractPrincipalCollection { @@ -39,7 +40,7 @@ class RootCollection extends AbstractPrincipalCollection { * @return AvatarHome */ public function getChildForPrincipal(array $principalInfo) { - $avatarManager = \OC::$server->getAvatarManager(); + $avatarManager = \OC::$server->get(IAvatarManager::class); return new AvatarHome($principalInfo, $avatarManager); }