1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/gd/tests/gh16260.phpt
2024-10-06 11:01:17 +01:00

23 lines
475 B
PHP

--TEST--
GH-16260 (Overflow/underflow on imagerotate degrees argument)
--EXTENSIONS--
gd
--FILE--
<?php
$im = imagecreatetruecolor(10,10);
try {
imagerotate($im, PHP_INT_MIN, 0);
} catch (\ValueError $e) {
echo $e->getMessage() . PHP_EOL;
}
try {
imagerotate($im, PHP_INT_MAX, 0);
} catch (\ValueError $e) {
echo $e->getMessage();
}
--EXPECTF--
imagerotate(): Argument #2 ($angle) must be between %s and %s
imagerotate(): Argument #2 ($angle) must be between %s and %s