1--TEST-- 2Bug #77195 (Incorrect error handling of imagecreatefromjpeg()) 3--SKIPIF-- 4<?php 5if (!extension_loaded('gd')) die('skip gd extension not available'); 6if (!gd_info()['JPEG Support']) die('skip JPEG support not available'); 7?> 8--FILE-- 9<?php 10$filename = __DIR__ . '/bug77195.jpeg'; 11@imagecreatefromjpeg($filename); 12imagecreatefromjpeg($filename); 13?> 14===DONE=== 15--EXPECTF-- 16Warning: imagecreatefromjpeg(): gd-jpeg: JPEG library reports unrecoverable error: JPEG datastream contains no image in %s on line %d 17 18Warning: imagecreatefromjpeg(): '%s' is not a valid JPEG file in %s on line %d 19===DONE=== 20