瀏覽代碼

Properly return an int in the getId function of the cache

fixes #16684

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Roeland Jago Douma 5 年之前
父節點
當前提交
650927a822
共有 1 個文件被更改,包括 1 次插入1 次删除
  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;
 		}