Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(trashbackend): Fix type in userHasAccessToFolder
Fix crash caused by the following exception:

OCA\\GroupFolders\\Trash\\TrashBackend::OCA\\GroupFolders\\Trash\\{closure}():
Argument #1 ($folder) must be of type array,
OCA\\GroupFolders\\Folder\\FolderDefinitionWithPermissions given in file
'/var/www/html/apps-extra/groupfolders/lib/Trash/TrashBackend.php' line 333

Signed-off-by: Carl Schwan <[email protected]>
  • Loading branch information
Carl Schwan committed Aug 7, 2025
commit a10f9b28c017410ff913608c4f7e71b8215b7f03
3 changes: 2 additions & 1 deletion lib/Trash/TrashBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use OCA\Files_Trashbin\Trash\ITrashBackend;
use OCA\Files_Trashbin\Trash\ITrashItem;
use OCA\GroupFolders\ACL\ACLManagerFactory;
use OCA\GroupFolders\Folder\FolderDefinition;
use OCA\GroupFolders\Folder\FolderDefinitionWithPermissions;
use OCA\GroupFolders\Folder\FolderManager;
use OCA\GroupFolders\Folder\FolderWithMappingsAndCache;
Expand Down Expand Up @@ -330,7 +331,7 @@ private function moveFromEncryptedStorage(IStorage $sourceStorage, IStorage $tar

private function userHasAccessToFolder(IUser $user, int $folderId): bool {
$folders = $this->folderManager->getFoldersForUser($user);
$folderIds = array_map(fn (array $folder): int => $folder->id, $folders);
$folderIds = array_map(fn (FolderDefinition $folder): int => $folder->id, $folders);

return in_array($folderId, $folderIds);
}
Expand Down
Loading