Skip to content

Commit d9d1d04

Browse files
Merge pull request #57750 from nextcloud/carl/fix-cacheentry-groupfolder
fix(cache): Fix parsing cache entry from groupfolder
2 parents f819486 + dd26a8b commit d9d1d04

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

lib/private/Files/Cache/Cache.php

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -180,15 +180,19 @@ public static function cacheEntryFromData(array $data, IMimeTypeLoader $mimetype
180180
];
181181

182182
if (isset($data['folder_id'])) {
183-
// groupfolders specific fields
183+
// groupfolders and collectives specific fields
184184
$normalized['folder_id'] = (int)$data['folder_id'];
185-
$normalized['mount_point'] = (string)$data['mount_point'];
186-
$normalized['quota'] = $data['quota'];
187-
$normalized['acl'] = (int)$data['acl'];
188-
$normalized['acl_default_no_permission'] = (int)$data['acl_default_no_permission'];
189-
$normalized['storage_id'] = (int)$data['storage_id'];
190-
$normalized['root_id'] = (int)$data['root_id'];
191-
$normalized['options'] = (string)$data['options'];
185+
186+
if (isset($data['storage_id'])) {
187+
// groupfolders specific fields
188+
$normalized['mount_point'] = (string)$data['mount_point'];
189+
$normalized['quota'] = $data['quota'];
190+
$normalized['acl'] = (int)$data['acl'];
191+
$normalized['acl_default_no_permission'] = (int)$data['acl_default_no_permission'];
192+
$normalized['storage_id'] = (int)$data['storage_id'];
193+
$normalized['root_id'] = (int)$data['root_id'];
194+
$normalized['options'] = (string)$data['options'];
195+
}
192196
}
193197

194198
return new CacheEntry($normalized);

0 commit comments

Comments
 (0)