diff options
Diffstat (limited to 'lib/files/cache')
-rw-r--r-- | lib/files/cache/cache.php | 4 | ||||
-rw-r--r-- | lib/files/cache/legacy.php | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/files/cache/cache.php b/lib/files/cache/cache.php index 3652dc7cf23..01e6e788263 100644 --- a/lib/files/cache/cache.php +++ b/lib/files/cache/cache.php @@ -500,8 +500,8 @@ class Cache { public function getIncomplete() { $query = \OC_DB::prepare('SELECT `path` FROM `*PREFIX*filecache`' . ' WHERE `storage` = ? AND `size` = -1 ORDER BY `fileid` DESC LIMIT 1'); - $query->execute(array($this->numericId)); - if ($row = $query->fetchRow()) { + $result = $query->execute(array($this->numericId)); + if ($row = $result->fetchRow()) { return $row['path']; } else { return false; diff --git a/lib/files/cache/legacy.php b/lib/files/cache/legacy.php index 6d1ffa7b40b..2b8689fcbda 100644 --- a/lib/files/cache/legacy.php +++ b/lib/files/cache/legacy.php @@ -51,12 +51,12 @@ class Legacy { $this->cacheHasItems = false; return false; } - + if ($result === false || property_exists($result, 'error_message_prefix')) { $this->cacheHasItems = false; return false; - } - + } + $this->cacheHasItems = (bool)$result->fetchRow(); return $this->cacheHasItems; } |