diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-05-08 13:33:55 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-05-08 13:33:55 +0200 |
commit | 05dc694c5c113079306a351f16a422e514d4a1e8 (patch) | |
tree | dabd836ddf7720c4e9b2115e13659a45b2570a8c | |
parent | f73a1686946a701347c63bc364952d627908009e (diff) | |
download | nextcloud-server-05dc694c5c113079306a351f16a422e514d4a1e8.tar.gz nextcloud-server-05dc694c5c113079306a351f16a422e514d4a1e8.zip |
Fix getPathById for Oracle
Added extra code to handle the case of Oracle which saves empty strings
as null values.
-rw-r--r-- | lib/private/files/cache/cache.php | 4 |
1 files changed, 4 insertions, 0 deletions
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; |