mirror of
https://github.com/nextcloud/server.git
synced 2026-06-04 06:13:34 -04:00
Fix getPathById for Oracle
Added extra code to handle the case of Oracle which saves empty strings
as null values.
Backport of 05dc694 from master
This commit is contained in:
parent
b91e3be5de
commit
37e29169e0
1 changed files with 4 additions and 0 deletions
4
lib/private/files/cache/cache.php
vendored
4
lib/private/files/cache/cache.php
vendored
|
|
@ -589,6 +589,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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue