From 0650af32474652ef4a20b00df116f5f9535f5e86 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 595a0216a5ccf..1841a17e0be91 100644 --- a/core/Command/Info/FileUtils.php +++ b/core/Command/Info/FileUtils.php @@ -85,7 +85,7 @@ public function getNode(string $fileInput): ?Node { if (!$mounts) { return null; } - $mount = $mounts[0]; + $mount = reset($mounts); $userFolder = $this->rootFolder->getUserFolder($mount->getUser()->getUID()); return $userFolder->getFirstNodeById((int)$fileInput); } else {