Pārlūkot izejas kodu

Merge pull request #16686 from nextcloud/fix/16684/return_int_getIf

Properly return an int in the getId function of the cache
Roeland Jago Douma 5 gadi atpakaļ
vecāks
revīzija
6b11862611
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      lib/private/Files/Cache/Cache.php

+ 1 - 1
lib/private/Files/Cache/Cache.php

@@ -416,7 +416,7 @@ class Cache implements ICache {
 		$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;
 		}