Skip to content

Commit e18fde1

Browse files
committed
Remove -1 crop mode
1 parent f8038f8 commit e18fde1

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

UPGRADING

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ PHP 8.0 UPGRADE NOTES
5353
RFC: https://wiki.php.net/rfc/image2wbmp
5454
. The deprecated functions png2wbmp() and jpeg2wbmp() have been removed.
5555
RFC: https://wiki.php.net/rfc/deprecate-png-jpeg-2wbmp
56+
. The default $mode parameter of imagecropauto() no longer accepts -1.
57+
IMG_CROP_DEFAULT should be used instead.
5658

5759
- GMP:
5860
. gmp_random() has been removed. One of gmp_random_range() or

ext/gd/gd.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4452,10 +4452,6 @@ PHP_FUNCTION(imagecropauto)
44524452
}
44534453

44544454
switch (mode) {
4455-
case -1:
4456-
php_error_docref(NULL, E_DEPRECATED, "Crop mode -1 is deprecated. Use IMG_CROP_DEFAULT instead.");
4457-
mode = GD_CROP_DEFAULT;
4458-
/* FALLTHRU */
44594455
case GD_CROP_DEFAULT:
44604456
case GD_CROP_TRANSPARENT:
44614457
case GD_CROP_BLACK:

0 commit comments

Comments
 (0)