xref: /PHP-8.0/ext/exif/tests/bug68547.phpt (revision dad5cb44)
1--TEST--
2Bug #68547 (Exif Header component value check error)
3--SKIPIF--
4<?php
5if (!extension_loaded('mbstring')) print 'skip mbstring extension not available';
6if (!extension_loaded('exif')) print 'skip exif extension not available';
7?>
8--FILE--
9<?php
10var_dump(exif_read_data(__DIR__ . DIRECTORY_SEPARATOR . 'bug68547.jpg'));
11?>
12--EXPECTF--
13array(12) {
14  ["FileName"]=>
15  string(12) "bug68547.jpg"
16  ["FileDateTime"]=>
17  int(%d)
18  ["FileSize"]=>
19  int(713)
20  ["FileType"]=>
21  int(2)
22  ["MimeType"]=>
23  string(10) "image/jpeg"
24  ["SectionsFound"]=>
25  string(20) "ANY_TAG, IFD0, WINXP"
26  ["COMPUTED"]=>
27  array(5) {
28    ["html"]=>
29    string(20) "width="1" height="1""
30    ["Height"]=>
31    int(1)
32    ["Width"]=>
33    int(1)
34    ["IsColor"]=>
35    int(1)
36    ["ByteOrderMotorola"]=>
37    int(0)
38  }
39  ["Subject"]=>
40  string(10) "Subjec??.."
41  ["Keywords"]=>
42  string(0) ""
43  ["Author"]=>
44  string(9) "Rui Carmo"
45  ["Comments"]=>
46  string(29) "Comments
47Line2
48Line3
49Line4"
50  ["Title"]=>
51  string(8) "Title..."
52}
53