aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Storage/Local.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Files/Storage/Local.php')
-rw-r--r--lib/private/Files/Storage/Local.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php
index fe6a6d6e21a..1ff733e0d92 100644
--- a/lib/private/Files/Storage/Local.php
+++ b/lib/private/Files/Storage/Local.php
@@ -249,7 +249,7 @@ class Local extends \OC\Files\Storage\Common {
$fullPath = $this->getSourcePath($path);
if (PHP_INT_SIZE === 4) {
$helper = new \OC\LargeFileHelper;
- return $helper->getFileSize($fullPath) ?? false;
+ return $helper->getFileSize($fullPath);
}
return filesize($fullPath);
}
@@ -617,6 +617,7 @@ class Local extends \OC\Files\Storage\Common {
}
public function writeStream(string $path, $stream, int $size = null): int {
+ /** @var int|false $result We consider here that returned size will never be a float because we write less than 4GB */
$result = $this->file_put_contents($path, $stream);
if (is_resource($stream)) {
fclose($stream);