From bba59bf815c3189432234ebce88ee5d0c9cc326c Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 13 Aug 2014 18:06:28 +0200 Subject: [PATCH] Cast file id's to int so we can compare them properly --- apps/files_sharing/lib/sharedstorage.php | 4 ++-- lib/private/files/view.php | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php index 8d5b22dc28..02fcd7041d 100644 --- a/apps/files_sharing/lib/sharedstorage.php +++ b/apps/files_sharing/lib/sharedstorage.php @@ -48,10 +48,10 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage { /** * get file cache of the shared item source - * @return string + * @return int */ public function getSourceId() { - return $this->share['file_source']; + return (int) $this->share['file_source']; } /** diff --git a/lib/private/files/view.php b/lib/private/files/view.php index 2a28e6fce8..6749fcd55d 100644 --- a/lib/private/files/view.php +++ b/lib/private/files/view.php @@ -1182,6 +1182,7 @@ class View { * @return string|null */ public function getPath($id) { + $id = (int) $id; $manager = Filesystem::getMountManager(); $mounts = $manager->findIn($this->fakeRoot); $mounts[] = $manager->find($this->fakeRoot);