summaryrefslogtreecommitdiff
path: root/src/Diactoros/UploadedFileFactory.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Diactoros/UploadedFileFactory.php')
-rw-r--r--src/Diactoros/UploadedFileFactory.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Diactoros/UploadedFileFactory.php b/src/Diactoros/UploadedFileFactory.php
index 4f09fb23..45773287 100644
--- a/src/Diactoros/UploadedFileFactory.php
+++ b/src/Diactoros/UploadedFileFactory.php
@@ -27,9 +27,10 @@ final class UploadedFileFactory implements UploadedFileFactoryInterface
string $clientMediaType = null
): UploadedFileInterface {
if ($size === null) {
- $size = $stream->getSize();
+ $size = (int) $stream->getSize();
}
+ /** @var resource $stream */
return new UploadedFile($stream, $size, $error, $clientFilename, $clientMediaType);
}
}