diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php index ac3696118f7ee..6f6ffc8cb9e50 100644 --- a/lib/private/Files/Storage/Local.php +++ b/lib/private/Files/Storage/Local.php @@ -399,8 +399,8 @@ public function fopen($path, $mode) { return $result; } - public function hash($type, $path, $raw = false) { - return hash_file($type, $this->getSourcePath($path), $raw); + public function hash($type, $path, $raw = false): string|false { + return hash_file($type, $this->getSourcePath($path), $raw) ?? false; } public function free_space($path) {