Skip to content

Commit

Permalink
Ensure that the hash method does not return null
Browse files Browse the repository at this point in the history
  • Loading branch information
artonge committed Jul 1, 2024
1 parent beececf commit 4896b63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/private/Files/Storage/Local.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 4896b63

Please sign in to comment.