Review 13.4 Merged

94450[BUGFIX] Convert float precision in image crop command

Garvin Hicking CR +2 V +2 Normal +128 −1 updated 06/10/26, 02:01

Commit message

`Area::applyRatioRestriction()` can produce near-zero
float residuals (e.g. 1.14e-13) for crop offsets.
PHP 8.4 renders these in scientific notation when
cast to string, causing ImageMagick to reject the
`-crop ...` parameter geometry.

This patch fixes the issue by casting values to
integers via round() - since pixel dimensions are
passed to ImageMagick, floats would never be utilized.

A test to cover this scenario is added.

Review

  • Code review CR +2 Done
    • Garvin Hicking +2
  • Verified V +2 Done
    • Garvin Hicking +2
    • core-ci +1 CI

Issues 1

Files 4

Review log 34

  1. Garvin Hicking commented on patch set 1 06/10/26, 01:53

    Cherry Picked from branch 14.3.
  2. core-ci voted on patch set 1 V +1 06/10/26, 02:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/103259

  3. Garvin Hicking voted on patch set 1 CR +2 V +2 06/10/26, 02:01

  4. Garvin Hicking merged patch set 2 06/10/26, 02:01