1
0
mirror of https://github.com/php/php-src.git synced 2026-04-19 14:01:01 +02:00
Files
archived-php-src/ext/gd/tests/bug72494.phpt
Máté Kocsis 50765075db Improve some ValueError messages
Closes GH-5340
2020-04-06 10:41:01 +02:00

20 lines
432 B
PHP

--TEST--
Bug #72494 (imagecropauto out-of-bounds access)
--SKIPIF--
<?php
if (!extension_loaded('gd')) die('skip gd extension not available');
?>
--FILE--
<?php
require __DIR__ . '/func.inc';
$im = imagecreate(10,10);
trycatch_dump(
fn() => imagecropauto($im, IMG_CROP_THRESHOLD, 0, 1337)
);
?>
--EXPECT--
!! [ValueError] imagecropauto(): Argument #4 ($color) must be greater than or equal to 0 when using the threshold mode