aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-09-16 17:15:18 +0200
committerGitHub <noreply@github.com>2024-09-16 17:15:18 +0200
commitdde0b48c9375ed4f5fd7bac3b03e2b1c75ce9926 (patch)
tree67f8016996aab510ef1c4a25f3e4f7796c3c4b80
parentd9c5512878c28a4483116969e2ca77cce0131257 (diff)
parent9acaf0788f9fb0a1f60d7c6566a46f73a83c87e1 (diff)
downloadnextcloud-server-dde0b48c9375ed4f5fd7bac3b03e2b1c75ce9926.tar.gz
nextcloud-server-dde0b48c9375ed4f5fd7bac3b03e2b1c75ce9926.zip
Merge pull request #46218 from nextcloud/artonge/fix/hash_return_type
-rw-r--r--lib/private/Files/Storage/Local.php2
-rw-r--r--lib/private/Files/Storage/Wrapper/Availability.php1
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php
index 811a000ad6f..c550cf75bc6 100644
--- a/lib/private/Files/Storage/Local.php
+++ b/lib/private/Files/Storage/Local.php
@@ -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);
}
diff --git a/lib/private/Files/Storage/Wrapper/Availability.php b/lib/private/Files/Storage/Wrapper/Availability.php
index 149cbbaa33b..6bd622e1c1b 100644
--- a/lib/private/Files/Storage/Wrapper/Availability.php
+++ b/lib/private/Files/Storage/Wrapper/Availability.php
@@ -315,6 +315,7 @@ class Availability extends Wrapper {
return parent::hash($type, $path, $raw);
} catch (StorageNotAvailableException $e) {
$this->setUnavailable($e);
+ return false;
}
}