1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 06:51:18 +02:00
Files
archived-php-src/ext/gd/tests/bug77195.phpt
Fabien Villepinte a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00

18 lines
581 B
PHP

--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);
?>
--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