Skip to content

Commit

Permalink
Merge pull request #16689 from nextcloud/backport/16686/stable16
Browse files Browse the repository at this point in the history
[stable16] Properly return an int in the getId function of the cache
  • Loading branch information
rullzer committed Aug 8, 2019
2 parents 89ba8c6 + 55ad6c1 commit fff47cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/private/Files/Cache/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ public function getId($file) {
$sql = 'SELECT `fileid` FROM `*PREFIX*filecache` WHERE `storage` = ? AND `path_hash` = ?';
$result = $this->connection->executeQuery($sql, array($this->getNumericStorageId(), $pathHash));
if ($row = $result->fetch()) {
return $row['fileid'];
return (int)$row['fileid'];
} else {
return -1;
}
Expand Down

0 comments on commit fff47cd

Please sign in to comment.