explicitly cast to int

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2016-10-10 14:16:25 +02:00
parent ab10a54836
commit 1484d01ff6
No known key found for this signature in database
GPG Key ID: 425003AC385454C5
1 changed files with 5 additions and 2 deletions

View File

@ -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(), '/');