xref: /PHP-7.2/ext/standard/tests/image/bug72278.phpt (revision f1d7e3ca)
1--TEST--
2Bug #72278 (getimagesize returning FALSE on valid jpg)
3--SKIPIF--
4<?php
5if (!defined('IMAGETYPE_JPEG')) die('skip images of type JPEG not supported');
6?>
7--FILE--
8<?php
9define('FILENAME', __DIR__ . DIRECTORY_SEPARATOR . 'bug72278.jpg');
10
11var_dump(getimagesize(FILENAME));
12?>
13===DONE===
14--EXPECTF--
15Warning: getimagesize(): corrupt JPEG data: 3 extraneous bytes before marker in %s%ebug72278.php on line %d
16array(7) {
17  [0]=>
18  int(300)
19  [1]=>
20  int(300)
21  [2]=>
22  int(2)
23  [3]=>
24  string(24) "width="300" height="300""
25  ["bits"]=>
26  int(8)
27  ["channels"]=>
28  int(3)
29  ["mime"]=>
30  string(10) "image/jpeg"
31}
32===DONE===
33