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

25 lines
473 B
PHP

--TEST--
Bug #72709 (imagesetstyle() causes OOB read for empty $styles)
--SKIPIF--
<?php
if (!extension_loaded('gd')) die('skip ext/gd not available');
?>
--FILE--
<?php
$im = imagecreatetruecolor(1, 1);
try {
var_dump(imagesetstyle($im, array()));
}
catch (\Error $ex) {
echo $ex->getMessage() . "\n";
}
imagesetpixel($im, 0, 0, IMG_COLOR_STYLED);
imagedestroy($im);
?>
====DONE====
--EXPECT--
imagesetstyle(): Argument #2 ($styles) cannot be empty
====DONE====