xref: /php-src/ext/gd/tests/bug45799.phpt (revision 0b8466f2)
1--TEST--
2Bug #45799 (imagepng() crashes on empty image).
3--EXTENSIONS--
4gd
5--SKIPIF--
6<?php
7if (!(imagetypes() & IMG_PNG)) {
8    die("skip No PNG support");
9}
10?>
11--FILE--
12<?php
13$img = imagecreate(500,500);
14imagepng($img);
15imagedestroy($img);
16?>
17--EXPECTF--
18Warning: imagepng(): gd-png error: no colors in palette%win %s on line %d
19