]> source.dussan.org Git - nextcloud-server.git/commitdiff
Cast file id's to int so we can compare them properly
authorRobin Appelman <icewind@owncloud.com>
Wed, 13 Aug 2014 16:06:28 +0000 (18:06 +0200)
committerRobin Appelman <icewind@owncloud.com>
Wed, 13 Aug 2014 22:55:10 +0000 (00:55 +0200)
apps/files_sharing/lib/sharedstorage.php
lib/private/files/view.php

index 8d5b22dc2834b469a5ded592db59cdca906c4667..02fcd7041dd04f6787eac0a64b1a3c36b9edf566 100644 (file)
@@ -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'];
        }
 
        /**
index 11c25f89c04c88ccb1efbb7c9adcf8958d23d27a..44e44adfd2e2f382f405c7b14ce6d223c9e8c23b 100644 (file)
@@ -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);