xref: /PHP-5.4/ext/gd/tests/bug39780_extern.phpt (revision 70650810)
1--TEST--
2Bug #39780 (PNG image with CRC/data error raises a fatal error)
3--SKIPIF--
4<?php
5	if (!extension_loaded('gd')) die("skip gd extension not available\n");
6	if (GD_BUNDLED) die("skip requires extern GD\n");
7?>
8--FILE--
9<?php
10
11$im = imagecreatefrompng(dirname(__FILE__) . '/bug39780.png');
12var_dump($im);
13?>
14--EXPECTF--
15gd-png:  fatal libpng error: Read Error: truncated data
16gd-png error: setjmp returns error condition 2
17Warning: imagecreatefrompng(): '%sbug39780.png' is not a valid PNG file in /%s on line %d
18bool(false)