summaryrefslogtreecommitdiff
path: root/ext/gd/tests/bug45799.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/gd/tests/bug45799.phpt')
-rw-r--r--ext/gd/tests/bug45799.phpt15
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/gd/tests/bug45799.phpt b/ext/gd/tests/bug45799.phpt
new file mode 100644
index 0000000..a28f940
--- /dev/null
+++ b/ext/gd/tests/bug45799.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #45799 (imagepng() crashes on empty image).
+--SKIPIF--
+<?php
+ if (!extension_loaded('gd')) die("skip gd extension not available\n");
+?>
+--FILE--
+<?php
+$img = imagecreate(500,500);
+imagepng($img);
+imagedestroy($img);
+?>
+--EXPECTF--
+
+Warning: imagepng(): gd-png error: no colors in palette in %s on line %d