summaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Node
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2016-10-10 14:16:25 +0200
committerRobin Appelman <robin@icewind.nl>2016-10-12 16:12:39 +0200
commit1484d01ff623317e6c14c02ad1053b68f30f2622 (patch)
tree6830dacf9c61a3afbffe592f2f5f75fa4497300b /lib/private/Files/Node
parentab10a548366a030bd58b97a5ea88588b8138aee7 (diff)
downloadnextcloud-server-1484d01ff623317e6c14c02ad1053b68f30f2622.tar.gz
nextcloud-server-1484d01ff623317e6c14c02ad1053b68f30f2622.zip
explicitly cast to int
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Files/Node')
-rw-r--r--lib/private/Files/Node/Folder.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/private/Files/Node/Folder.php b/lib/private/Files/Node/Folder.php
index b12ded8e796..353b89068cb 100644
--- a/lib/private/Files/Node/Folder.php
+++ b/lib/private/Files/Node/Folder.php
@@ -265,7 +265,7 @@ class Folder extends Node implements \OCP\Files\Folder {
*/
public function getById($id) {
$mountCache = $this->root->getUserMountCache();
- $mountsContainingFile = $mountCache->getMountsForFileId($id);
+ $mountsContainingFile = $mountCache->getMountsForFileId((int)$id);
$mounts = $this->root->getMountsIn($this->path);
$mounts[] = $this->root->getMount($this->path);
/** @var IMountPoint[] $folderMounts */
@@ -285,7 +285,10 @@ class Folder extends Node implements \OCP\Files\Folder {
// we only need to get the cache info once, since all mounts we found point to the same storage
$mount = $folderMounts[$mountsContainingFile[0]->getMountPoint()];
- $cacheEntry = $mount->getStorage()->getCache()->get($id);
+ $cacheEntry = $mount->getStorage()->getCache()->get((int)$id);
+ if (!$cacheEntry) {
+ return [];
+ }
// cache jails will hide the "true" internal path
$internalPath = ltrim($mountsContainingFile[0]->getRootInternalPath() . '/' . $cacheEntry->getPath(), '/');