mirror of
https://github.com/nextcloud/server.git
synced 2026-05-26 19:32:28 -04:00
Merge pull request #48102 from nextcloud/backport/46218/stable27
[stable27] Ensure that the hash method does not return null
This commit is contained in:
commit
4faa061eb9
2 changed files with 2 additions and 1 deletions
|
|
@ -439,7 +439,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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -334,6 +334,7 @@ class Availability extends Wrapper {
|
|||
return parent::hash($type, $path, $raw);
|
||||
} catch (StorageNotAvailableException $e) {
|
||||
$this->setUnavailable($e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue