xref: /PHP-7.0/ext/standard/tests/image/bug72278.phpt (revision 82df4e26)
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--
15
16Warning: getimagesize(): corrupt JPEG data: 3 extraneous bytes before marker in %s%ebug72278.php on line %d
17array(7) {
18  [0]=>
19  int(300)
20  [1]=>
21  int(300)
22  [2]=>
23  int(2)
24  [3]=>
25  string(24) "width="300" height="300""
26  ["bits"]=>
27  int(8)
28  ["channels"]=>
29  int(3)
30  ["mime"]=>
31  string(10) "image/jpeg"
32}
33===DONE===
34