- Issue created by @robphillips
- last update
about 1 year ago 8,613 pass - @robphillips opened merge request.
- Status changed to Needs review
about 1 year ago 1:45pm 28 April 2023 - 🇺🇸United States robphillips
Patch from MR. If either width or height is not a positive number do not return a style name.
https://git.drupalcode.org/project/image_effects/-/merge_requests/32/dif...
- Status changed to Needs work
about 1 year ago 6:33pm 28 April 2023 - 🇮🇹Italy mondrake 🇮🇹
Thanks.
1) instead of returning in getChildImageStyleToExecute, I'd rather avoid to call it in applyEffect and transformDimensions when the image is invalid.
2) an automated test would help prevent regressions. - 🇭🇷Croatia Aporie
There is a duplicated issue #3136292: Division by zero in AspectSwitcherImageEffect → which patch caused us
Error: Xdebug has detected a possible infinite loop, and aborted your script with a stack depth of '256' frames in is_int() (line 331 of core/lib/Drupal/Component/Utility/NestedArray.php).
This patch is fine though (and seems an easier approach) than the attached duplicated issue.