diff options
Diffstat (limited to 'lib/private/files/cache/cache.php')
-rw-r--r-- | lib/private/files/cache/cache.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/private/files/cache/cache.php b/lib/private/files/cache/cache.php index 1c9de56f8c5..3e4f6dfb132 100644 --- a/lib/private/files/cache/cache.php +++ b/lib/private/files/cache/cache.php @@ -109,7 +109,7 @@ class Cache { * get the stored metadata of a file or folder * * @param string/int $file - * @return array | false + * @return array|false */ public function get($file) { if (is_string($file) or $file == '') { @@ -450,7 +450,7 @@ class Cache { * search for files matching $pattern * * @param string $pattern - * @return array of file data + * @return array an array of file data */ public function search($pattern) { @@ -597,12 +597,16 @@ class Cache { * get the path of a file on this storage by it's id * * @param int $id - * @return string | null + * @return string|null */ public function getPathById($id) { $sql = 'SELECT `path` FROM `*PREFIX*filecache` WHERE `fileid` = ? AND `storage` = ?'; $result = \OC_DB::executeAudited($sql, array($id, $this->getNumericStorageId())); if ($row = $result->fetchRow()) { + // Oracle stores empty strings as null... + if ($row['path'] === null) { + return ''; + } return $row['path']; } else { return null; @@ -636,7 +640,7 @@ class Cache { /** * normalize the given path - * @param $path + * @param string $path * @return string */ public function normalize($path) { |