Skip to content

Commit c1a704d

Browse files
authored
Merge pull request #20 from VanOns/bugfix/file-extension-fallback
fix: use fallback if no extension is set
2 parents 423802a + 3611e93 commit c1a704d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DataTransferObjects/Filename.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function __construct(UploadedFile|string $file)
2929

3030
$pathInfo = pathinfo($file);
3131
$this->name = $this->formatFilename($pathInfo['filename']);
32-
$this->extension = $pathInfo['extension'] === '' ? null : $pathInfo['extension'];
32+
$this->extension = empty($pathInfo['extension']) ? null : $pathInfo['extension'];
3333
$this->path = $pathInfo['dirname'] === '.' ? null : $pathInfo['dirname'];
3434
}
3535

0 commit comments

Comments
 (0)