diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php index eec1c236116c9..7ca1a2d6f37f1 100644 --- a/lib/private/Files/Storage/Local.php +++ b/lib/private/Files/Storage/Local.php @@ -400,7 +400,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 149cbbaa33b8f..6bd622e1c1bb1 100644 --- a/lib/private/Files/Storage/Wrapper/Availability.php +++ b/lib/private/Files/Storage/Wrapper/Availability.php @@ -315,6 +315,7 @@ public function hash($type, $path, $raw = false) { return parent::hash($type, $path, $raw); } catch (StorageNotAvailableException $e) { $this->setUnavailable($e); + return false; } }