DivisionByZeroError when calculating automated crop of missing image

Created on 15 March 2024, 9 months ago
Updated 28 March 2024, 9 months ago

Problem/Motivation

In AbstractAutomatedCrop::setOriginalSize(), the result of getWidth() and getHeight() is casted to an integer. Those methods can return NULL if the image is invalid. In that case, the calculation in automatedCropBoxCalculation() triggers a DivisionByZeroError, since we're dividing by the height which is 0.

Proposed resolution

Early return when $height is 0.

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium dieterholvoet Brussels

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024