php-src/ext/gd/tests/libgd00101.phpt
Christoph M. Becker a375d54785
Migrate skip checks to --EXTENSIONS-- for ext/gd
Cf. PR #6787.

Closes GH-6994.
2021-05-22 15:38:51 +02:00

20 lines
545 B
PHP

--TEST--
libgd #101 (imagecreatefromgd can crash if gdImageCreate fails)
--EXTENSIONS--
gd
--SKIPIF--
<?php
if (!GD_BUNDLED) die("skip requires bundled GD library\n");
?>
--FILE--
<?php
$im = imagecreatefromgd(__DIR__ . '/libgd00101.gd');
var_dump($im);
?>
--EXPECTF--
Warning: imagecreatefromgd(): Product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully
in %slibgd00101.php on line %d
Warning: imagecreatefromgd(): "%slibgd00101.gd" is not a valid GD file in %slibgd00101.php on line %d
bool(false)