Skip to content

Commit

Permalink
Merge pull request #46218 from nextcloud/artonge/fix/hash_return_type
Browse files Browse the repository at this point in the history
  • Loading branch information
skjnldsv authored Sep 16, 2024
2 parents d9c5512 + 9acaf07 commit dde0b48
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/private/Files/Storage/Local.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
1 change: 1 addition & 0 deletions lib/private/Files/Storage/Wrapper/Availability.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit dde0b48

Please sign in to comment.