diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php index 8a8e570d50264..201f6d7daf4c4 100644 --- a/lib/private/Files/Storage/Local.php +++ b/lib/private/Files/Storage/Local.php @@ -435,7 +435,7 @@ public function fopen($path, $mode) { return $result; } - public function hash($type, $path, $raw = false) { + public function hash($type, $path, $raw = false): string|false { return hash_file($type, $this->getSourcePath($path), $raw); } diff --git a/lib/private/Files/Storage/Wrapper/Availability.php b/lib/private/Files/Storage/Wrapper/Availability.php index 693d943f0dc28..bab43977b608f 100644 --- a/lib/private/Files/Storage/Wrapper/Availability.php +++ b/lib/private/Files/Storage/Wrapper/Availability.php @@ -334,6 +334,7 @@ public function hash($type, $path, $raw = false) { return parent::hash($type, $path, $raw); } catch (StorageNotAvailableException $e) { $this->setUnavailable($e); + return false; } }