Merge pull request #46218 from nextcloud/artonge/fix/hash_return_type

This commit is contained in:
John Molakvoæ 2024-09-16 17:15:18 +02:00 committed by GitHub
commit dde0b48c93
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -400,7 +400,7 @@ class Local extends \OC\Files\Storage\Common {
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);
}

View file

@ -315,6 +315,7 @@ class Availability extends Wrapper {
return parent::hash($type, $path, $raw);
} catch (StorageNotAvailableException $e) {
$this->setUnavailable($e);
return false;
}
}