summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2013-06-11 06:20:27 -0700
committerJörn Friedrich Dreyer <jfd@butonic.de>2013-06-11 06:20:27 -0700
commit0eed1c980da1ea3d901d8e495c7a37bb5aac0cff (patch)
tree828dc2525d2236ffe38e3998d27313f924c95303 /lib
parentdb6080c5c682a2bbdc420399276b81311c17802c (diff)
parent875c18b115e649dae3a633d197ec8e2c156bbcb6 (diff)
downloadnextcloud-server-0eed1c980da1ea3d901d8e495c7a37bb5aac0cff.tar.gz
nextcloud-server-0eed1c980da1ea3d901d8e495c7a37bb5aac0cff.zip
Merge pull request #3652 from owncloud/fix_fetchrow_usage_for_mdb2
fix fetchRow checks to also work with MDB2
Diffstat (limited to 'lib')
-rw-r--r--lib/files/cache/cache.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/files/cache/cache.php b/lib/files/cache/cache.php
index 6c2ef71098b..5b2fcfaadf9 100644
--- a/lib/files/cache/cache.php
+++ b/lib/files/cache/cache.php
@@ -96,7 +96,7 @@ class Cache {
* get the stored metadata of a file or folder
*
* @param string/int $file
- * @return array
+ * @return array | false
*/
public function get($file) {
if (is_string($file) or $file == '') {
@@ -115,6 +115,12 @@ class Cache {
$result = $query->execute($params);
$data = $result->fetchRow();
+ //FIXME hide this HACK in the next database layer, or just use doctrine and get rid of MDB2 and PDO
+ //PDO returns false, MDB2 returns null, oracle always uses MDB2, so convert null to false
+ if ($data === null) {
+ $data = false;
+ }
+
//merge partial data
if (!$data and is_string($file)) {
if (isset($this->partial[$file])) {