1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
archived-php-src/ext/gd/tests/imagecreate_error.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

23 lines
480 B
PHP

--TEST--
Testing imagecreate(): error on out of bound parameters
--EXTENSIONS--
gd
--SKIPIF--
<?php
if (!function_exists("imagecreate")) die("skip GD Version not compatible");
?>
--FILE--
<?php
require __DIR__ . '/func.inc';
trycatch_dump(
fn() => imagecreate(-1, 30),
fn() => imagecreate(30, -1)
);
?>
--EXPECT--
!! [ValueError] imagecreate(): Argument #1 ($width) must be greater than 0
!! [ValueError] imagecreate(): Argument #2 ($height) must be greater than 0