- Issue created by @loze
Recently ran into the same issue after a series of core and server updates including the ImageMagick util, unfortunately it was discovered by an editor a few weeks after the updates so I'm not sure what part of the updates may have caused the problem to arise. The failure to scale is also accompanied by a warning in the site log.
The image toolkit 'imagemagick' failed processing 'scale' for image '/tmp/phpxyz'. Reported error: TypeError - round(): Argument #1 ($num) must be of type int|float, string given
- Status changed to Needs review
3 months ago 10:43pm 27 August 2024 - 🇺🇸United States loze Los Angeles
Thanks for the hint @jessica.k that is indeed what was happening. Apparently with php 8.0+ round fails if the variable is a string.
I've created a MR which casts the with and height variables as integers.
There may be other places in this module that we need to do this for, but for now this solves my original issue.
Here's a patch to use with composer.
- First commit to issue fork.
-
mondrake →
committed de0943b6 on 4.0.x authored by
loze →
Issue #3470400 by loze, jessica.k: Unable to resize image fields with...
-
mondrake →
committed de0943b6 on 4.0.x authored by
loze →
- Status changed to Fixed
3 months ago 5:45am 28 August 2024 Automatically closed - issue fixed for 2 weeks with no activity.