1--TEST--
2Testing imagetruecolortopalette(): wrong parameters for parameter 3
3--CREDITS--
4Rafael Dohms <rdohms [at] gmail [dot] com>
5--SKIPIF--
6<?php
7	if (!extension_loaded("gd")) die("skip GD not present");
8	if (!function_exists("imagecreatetruecolor")) die("skip GD Version not compatible");
9?>
10--FILE--
11<?php
12$image = imagecreatetruecolor(50, 50);
13$resource = tmpfile();
14
15imagetruecolortopalette($image, true, 'string');
16imagetruecolortopalette($image, true, $resource);
17imagetruecolortopalette($image, true, array());
18imagetruecolortopalette($image, true, null);
19
20?>
21--EXPECTF--
22Warning: imagetruecolortopalette() expects parameter 3 to be int, string given in %s on line %d
23
24Warning: imagetruecolortopalette() expects parameter 3 to be int, resource given in %s on line %d
25
26Warning: imagetruecolortopalette() expects parameter 3 to be int, array given in %s on line %d
27
28Warning: imagetruecolortopalette(): Number of colors has to be greater than zero and no more than %d in %s on line %d
29