summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2014-08-13 20:11:08 +0200
committerLukas Reschke <lukas@statuscode.ch>2014-08-13 20:11:08 +0200
commit2c8aa3751c6e0dab2439fee98cd173d579caed76 (patch)
treea3d1a0d6aa82e8b082dee089cdc9543eb65aed8e
parent54491e8c68a1973bf6ea3622310fba68bf9d4f43 (diff)
parentbba59bf815c3189432234ebce88ee5d0c9cc326c (diff)
downloadnextcloud-server-2c8aa3751c6e0dab2439fee98cd173d579caed76.tar.gz
nextcloud-server-2c8aa3751c6e0dab2439fee98cd173d579caed76.zip
Merge pull request #10403 from owncloud/getid-cast-int
Cast file id's to int so we can compare them properly
-rw-r--r--apps/files_sharing/lib/sharedstorage.php4
-rw-r--r--lib/private/files/view.php1
2 files changed, 3 insertions, 2 deletions
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 2a28e6fce88..6749fcd55d2 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);