xref: /PHP-8.2/ext/exif/tests/bug64739.phpt (revision bd9f4fa6)
1--TEST--
2Bug #64739 (Invalid Title and Author data returned)
3--EXTENSIONS--
4exif
5mbstring
6--FILE--
7<?php
8echo "Test\n";
9
10$headers1 = exif_read_data(__DIR__ . '/bug64739.jpg');
11
12if ($headers1 === false) {
13    echo 'Error, failed to read exif data';
14    exit;
15}
16
17var_dump($headers1['Title'][0] === '?');
18var_dump($headers1['Author'][0] === '?');
19
20ini_set('exif.decode_unicode_motorola', 'UCS-2LE');
21
22$headers2 = exif_read_data(__DIR__ . '/bug64739.jpg');
23
24if ($headers2 === false) {
25    echo 'Error, failed to read exif data';
26    exit;
27}
28
29var_dump($headers2['Title']);
30var_dump($headers2['Author']);
31
32?>
33Done
34--EXPECT--
35Test
36bool(true)
37bool(true)
38string(8) "55845364"
39string(13) "100420.000000"
40Done
41