aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2024-05-10 19:21:23 +0200
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2024-07-01 09:59:37 +0000
commit0650af32474652ef4a20b00df116f5f9535f5e86 (patch)
tree7513b30f93d50b4b85f483b2296fda259894ef80
parent3f72902bb5994010dbd50e8ec2f5e5cb49e2983c (diff)
downloadnextcloud-server-0650af32474652ef4a20b00df116f5f9535f5e86.tar.gz
nextcloud-server-0650af32474652ef4a20b00df116f5f9535f5e86.zip
fix: getMountsForFileId may return an unordered list
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
-rw-r--r--core/Command/Info/FileUtils.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/Command/Info/FileUtils.php b/core/Command/Info/FileUtils.php
index 595a0216a5c..1841a17e0be 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());
return $userFolder->getFirstNodeById((int)$fileInput);
} else {