New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MimeTypes::getMimeTypes() errors on custom mimetypes. #36715
Labels
Comments
Would you mind sending a fix with some test cases? From your description it should target 4.4. |
mcneely
added a commit
to mcneely/symfony
that referenced
this issue
May 5, 2020
mcneely
added a commit
to mcneely/symfony
that referenced
this issue
May 5, 2020
@nicolas-grekas done. |
mcneely
added a commit
to mcneely/symfony
that referenced
this issue
May 5, 2020
mcneely
added a commit
to mcneely/symfony
that referenced
this issue
May 9, 2020
mcneely
added a commit
to mcneely/symfony
that referenced
this issue
May 9, 2020
mcneely
added a commit
to mcneely/symfony
that referenced
this issue
May 9, 2020
mcneely
added a commit
to mcneely/symfony
that referenced
this issue
May 9, 2020
fabpot
added a commit
that referenced
this issue
May 9, 2020
This PR was merged into the 4.4 branch. Discussion ---------- [Mime] handle passing custom mime types as string | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #36715 | License | MIT | Doc PR | none Fix's issue where custom mimetypes were failing Commits ------- f3005ec Fix for #36715
nicolas-grekas
added a commit
that referenced
this issue
May 9, 2020
* 4.4: [HttpClient] improve testTimeoutIsNotAFatalError Fix for #36715
nicolas-grekas
added a commit
that referenced
this issue
May 9, 2020
* 5.0: [HttpClient] improve testTimeoutIsNotAFatalError Fix for #36715
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Symfony version(s) affected: looks like 4.2+
Description
Type error: Type error: Return value of Symfony\Component\Mime\MimeTypes::getMimeTypes() must be of the type array, string returned
when passing custom map through constructor.How to reproduce
$type =(new MimeTypes([ 'application/octet-stream' => ['rrd'] ]))->getMimeTypes('rrd')
Possible Solution
Add
[]
's around$mimeType
in constructorThe text was updated successfully, but these errors were encountered: