xref: /PHP-5.6/ext/gd/tests/bug45799.phpt (revision d2709b76)
1--TEST--
2Bug #45799 (imagepng() crashes on empty image).
3--SKIPIF--
4<?php
5	if (!extension_loaded('gd')) die("skip gd extension not available\n");
6?>
7--FILE--
8<?php
9$img = imagecreate(500,500);
10imagepng($img);
11imagedestroy($img);
12?>
13--EXPECTF--
14
15Warning: imagepng(): gd-png error: no colors in palette in %s on line %d
16