[Pkg-owncloud-commits] [owncloud] 58/69: Fix getPathById for Oracle
David Prévot
taffit at moszumanska.debian.org
Sat May 10 16:20:40 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit 05dc694c5c113079306a351f16a422e514d4a1e8
Author: Vincent Petry <pvince81 at owncloud.com>
Date: Thu May 8 13:33:55 2014 +0200
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(+)
diff --git a/lib/private/files/cache/cache.php b/lib/private/files/cache/cache.php
index 1c9de56..c4f03b4 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;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list