From 05dc694c5c113079306a351f16a422e514d4a1e8 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Thu, 8 May 2014 13:33:55 +0200 Subject: Fix getPathById for Oracle Added extra code to handle the case of Oracle which saves empty strings as null values. --- lib/private/files/cache/cache.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/private') diff --git a/lib/private/files/cache/cache.php b/lib/private/files/cache/cache.php index 1c9de56f8c5..c4f03b4d9ef 100644 --- a/lib/private/files/cache/cache.php +++ b/lib/private/files/cache/cache.php @@ -603,6 +603,10 @@ class Cache { $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; -- cgit v1.2.3