From: Robin Appelman Date: Wed, 13 Aug 2014 16:06:28 +0000 (+0200) Subject: Cast file id's to int so we can compare them properly X-Git-Tag: v7.0.2RC1~46 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e2f23b24f7d1213bd37b75d9386cea6f2a0a264a;p=nextcloud-server.git Cast file id's to int so we can compare them properly --- diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php index 8d5b22dc283..02fcd7041dd 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 11c25f89c04..44e44adfd2e 100644 --- a/lib/private/files/view.php +++ b/lib/private/files/view.php @@ -1179,6 +1179,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);