bug39780.phpt 562 B

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