You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current Behavior ico favicons cannot no longer be uploaded.
Steps to Reproduce
Go to Dashboard Apearence page.
Upload ico favicon.
Notice it errors out with a 500.
Environment
Flarum version: 1.0.3 (but introduced in beta 15)
Possible Solution
An abstract UploadImage controller class was introduced in beta 15, the makeImage method is expected to return a Intervention\Image\Image object, which is not the case for ico files where we return the file stream, this is because the GD extension used by intervention, does not support ico files.
We could remove the explicit typehint on the makeImage method, but that would break extensions, so the best thing to do is to throw a validation error on ico images in 1.x (since there is no way to fix this without making breaking changes) and we can fix the issue for 2.0
Bug Report
Current Behavior
ico
favicons cannot no longer be uploaded.Steps to Reproduce
ico
favicon.Environment
Possible Solution
An abstract
UploadImage
controller class was introduced in beta 15, themakeImage
method is expected to return aIntervention\Image\Image
object, which is not the case forico
files where we return the file stream, this is because the GD extension used by intervention, does not supportico
files.https://github.com/flarum/core/blob/a077ae9ca36a8ad0adc25042118ba2407feaa5fe/src/Api/Controller/UploadFaviconController.php#L29-L42
We could remove the explicit typehint on the
makeImage
method, but that would break extensions, so the best thing to do is to throw a validation error onico
images in 1.x (since there is no way to fix this without making breaking changes) and we can fix the issue for 2.0Additional Context
Relevant PR: flarum/framework#2477
The text was updated successfully, but these errors were encountered: