aboutsummaryrefslogtreecommitdiffstats
path: root/core/Command/Info
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2024-05-10 19:21:23 +0200
committerDaniel <mail@danielkesselberg.de>2024-05-10 22:49:28 +0200
commit69883ac0cc9b2b29a3ab108f3257819905c327c9 (patch)
tree21ede807d43761bc59ca12d536db0fe2e7fb8685 /core/Command/Info
parentf6d4af8b2c5ba2c589c77e3bd73e634329a17b5c (diff)
downloadnextcloud-server-69883ac0cc9b2b29a3ab108f3257819905c327c9.tar.gz
nextcloud-server-69883ac0cc9b2b29a3ab108f3257819905c327c9.zip
fix: getMountsForFileId may return an unordered list
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'core/Command/Info')
-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 {