summaryrefslogtreecommitdiff
path: root/ext/gd/tests/imagecreatetruecolor_error2.phpt
blob: a3c385c6cf35d6139e390a74d5d1959e11aef221 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--TEST--
Testing imagecreatetruecolor(): error on out of bound parameters
--CREDITS--
Rafael Dohms <rdohms [at] gmail [dot] com>
--SKIPIF--
<?php
	if (!extension_loaded("gd")) die("skip GD not present");
	if (!function_exists("imagecreatetruecolor")) die("skip GD Version not compatible");
?>
--FILE--
<?php
$image = imagecreatetruecolor(-1, 30);
$image = imagecreatetruecolor(30, -1);
$image = imagecreatetruecolor(999999999999999999999999999, 30);
$image = imagecreatetruecolor(30, 999999999999999999999999999);
?>
--EXPECTF--
Warning: imagecreatetruecolor(): Invalid image dimensions in %s on line %d

Warning: imagecreatetruecolor(): Invalid image dimensions in %s on line %d

Warning: imagecreatetruecolor() expects parameter 1 to be integer, float given in %s on line %d

Warning: imagecreatetruecolor() expects parameter 2 to be integer, float given in %s on line %d