Skip to content

Commit fff47cd

Browse files
authored
Merge pull request #16689 from nextcloud/backport/16686/stable16
[stable16] Properly return an int in the getId function of the cache
2 parents 89ba8c6 + 55ad6c1 commit fff47cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/private/Files/Cache/Cache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ public function getId($file) {
416416
$sql = 'SELECT `fileid` FROM `*PREFIX*filecache` WHERE `storage` = ? AND `path_hash` = ?';
417417
$result = $this->connection->executeQuery($sql, array($this->getNumericStorageId(), $pathHash));
418418
if ($row = $result->fetch()) {
419-
return $row['fileid'];
419+
return (int)$row['fileid'];
420420
} else {
421421
return -1;
422422
}

0 commit comments

Comments
 (0)