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