Skip to content

Commit

Permalink
Merge pull request #16686 from nextcloud/fix/16684/return_int_getIf
Browse files Browse the repository at this point in the history
Properly return an int in the getId function of the cache
  • Loading branch information
rullzer authored Aug 8, 2019
2 parents 00c1389 + 650927a commit 6b11862
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 6b11862

Please sign in to comment.