From e417f235ba60ce726021639699b8d0e794326977 Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Fri, 10 May 2024 19:21:23 +0200 Subject: [PATCH] fix: getMountsForFileId may return an unordered list Signed-off-by: Daniel Kesselberg --- core/Command/Info/FileUtils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/Command/Info/FileUtils.php b/core/Command/Info/FileUtils.php index 694f30f78b4..6bbaca65c29 100644 --- a/core/Command/Info/FileUtils.php +++ b/core/Command/Info/FileUtils.php @@ -85,7 +85,7 @@ class FileUtils { if (!$mounts) { return null; } - $mount = $mounts[0]; + $mount = reset($mounts); $userFolder = $this->rootFolder->getUserFolder($mount->getUser()->getUID()); $nodes = $userFolder->getById((int)$fileInput); if (!$nodes) { -- 2.39.5