xref: /PHP-8.0/ext/gd/tests/bug45799.phpt (revision c5401854)
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--
14Warning: imagepng(): gd-png error: no colors in palette in %s on line %d
15