Skip to content

Commit

Permalink
Merge branch '5.24' into 5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Davidmattei committed Nov 28, 2024
2 parents ec7f6c4 + 98dc5c0 commit 760a0c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion EMS/common-bundle/src/Helper/MimeTypeHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public static function getInstance(): self
public function guessMimeType(string $filename): string
{
$mimeType = $this->mimeTypes->guessMimeType($filename);
if (self::TEXT_PLAIN === $mimeType) {
if (\str_starts_with($mimeType ?? '', 'text/')) {
$ext = \pathinfo($filename, PATHINFO_EXTENSION);
$mimeType = $this->mimeTypes->getMimeTypes($ext)[0] ?? $mimeType;
}
Expand Down

0 comments on commit 760a0c5

Please sign in to comment.