xref: /php-src/ext/gd/tests/bug77195.phpt (revision a375d547)
1--TEST--
2Bug #77195 (Incorrect error handling of imagecreatefromjpeg())
3--EXTENSIONS--
4gd
5--SKIPIF--
6<?php
7if (!gd_info()['JPEG Support']) die('skip JPEG support not available');
8?>
9--FILE--
10<?php
11$filename = __DIR__ . '/bug77195.jpg';
12@imagecreatefromjpeg($filename);
13imagecreatefromjpeg($filename);
14?>
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