We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d5cd5e8 commit f259bafCopy full SHA for f259baf
1 file changed
src/Http/FileUpload.php
@@ -31,7 +31,7 @@ final class FileUpload
31
/** @var string */
32
private $name;
33
34
- /** @var string */
+ /** @var string|null|false */
35
private $type;
36
37
/** @var int */
@@ -85,7 +85,7 @@ public function getContentType(): ?string
85
if ($this->isOk() && $this->type === null) {
86
$this->type = finfo_file(finfo_open(FILEINFO_MIME_TYPE), $this->tmpName);
87
}
88
- return $this->type;
+ return $this->type ?: null;
89
90
91
0 commit comments