5353use OCP \Files \Storage \IDisableEncryptionStorage ;
5454use OCP \Files \Storage \IStorage ;
5555use OCP \Lock \ILockingProvider ;
56+ use OCP \Server ;
5657use OCP \Share \IShare ;
5758use Psr \Log \LoggerInterface ;
5859
@@ -166,7 +167,7 @@ private function init() {
166167 }
167168
168169 /** @var IRootFolder $rootFolder */
169- $ rootFolder = \ OC :: $ server -> get (IRootFolder::class);
170+ $ rootFolder = Server:: get (IRootFolder::class);
170171 $ this ->ownerUserFolder = $ rootFolder ->getUserFolder ($ this ->superShare ->getShareOwner ());
171172 $ sourceId = $ this ->superShare ->getNodeId ();
172173 $ ownerNodes = $ this ->ownerUserFolder ->getById ($ sourceId );
@@ -455,7 +456,7 @@ public function getCache($path = '', $storage = null) {
455456 $ this ->cache = new \OCA \Files_Sharing \Cache (
456457 $ storage ,
457458 $ sourceRoot ,
458- \ OC :: $ server -> get (CacheDependencies::class),
459+ Server:: get (CacheDependencies::class),
459460 $ this ->getShare ()
460461 );
461462 return $ this ->cache ;
@@ -480,7 +481,7 @@ public function getWatcher($path = '', $storage = null): Watcher {
480481 // Get node information
481482 $ node = $ this ->getShare ()->getNodeCacheEntry ();
482483 if ($ node instanceof CacheEntry) {
483- $ storageId = $ node ->getData ()['storage_string_id ' ];
484+ $ storageId = $ node ->getData ()['storage_string_id ' ] ?? null ;
484485 // for shares from the home storage we can rely on the home storage to keep itself up to date
485486 // for other storages we need use the proper watcher
486487 if (!(str_starts_with ($ storageId , 'home:: ' ) || str_starts_with ($ storageId , 'object::user ' ))) {
0 commit comments