-
Notifications
You must be signed in to change notification settings - Fork 57
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
IBX-7983: Handled previewing ezimage
field with height of 0
#2117
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any chance that height will be e.g. 0.00
or 0
perhaps? I was wondering if any sanitization/casting on the backend side makes sense.
@konradoboza I don't think there is a need as those are already parsed as strings https://github.com/ezsystems/ezplatform-kernel/blob/1.3/eZ/Publish/Core/Persistence/Legacy/Content/FieldValue/Converter/ImageConverter.php#L115 |
src/bundle/Resources/views/themes/admin/ui/field_type/preview/content_fields.html.twig
Outdated
Show resolved
Hide resolved
src/bundle/Resources/views/themes/admin/ui/field_type/preview/content_fields.html.twig
Outdated
Show resolved
Hide resolved
Quality Gate passedIssues Measures |
Division by
0
is impossible, hence, the change..avif
files in later PHP versions should be handled properly by thegetimagesize
method (since PHP 8.1 RC3), but we still have to handle older files somehow (dimension values are stored in .xmls in a database).Checklist:
$ composer fix-cs
)