croppa icon indicating copy to clipboard operation
croppa copied to clipboard

"Undefined array key 1" when given large single trim parameter

Open jordanade opened this issue 2 years ago • 1 comments

This filename: Hnr4t2QO4ugMstGTejDqUAkSyBXF2GlQozIjfs76-_x138-resize-trim(66218942676).png generated this error: Undefined array key 1 on this line: line 109: list($x1, $y1, $x2, $y2) = $coords; in this file: /vendor/bkwld/croppa/src/Image.php

For these kinds of invalid or out-of-range inputs, can we return, say, 422 Unprocessable Entity?

jordanade avatar Apr 15 '24 09:04 jordanade

Feel free to make a PR, with tests.

sdebacker avatar May 28 '24 12:05 sdebacker