mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Test case for bug #64739
This commit is contained in:
parent
1e9e7d4dc4
commit
b613392003
2 changed files with 41 additions and 0 deletions
BIN
ext/exif/tests/bug64739.jpg
Normal file
BIN
ext/exif/tests/bug64739.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |
41
ext/exif/tests/bug64739.phpt
Normal file
41
ext/exif/tests/bug64739.phpt
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
--TEST--
|
||||||
|
Bug #64739 (Invalid Title and Author data returned)
|
||||||
|
--SKIPIF--
|
||||||
|
<?php
|
||||||
|
extension_loaded("exif") or die("skip need exif");
|
||||||
|
?>
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
echo "Test\n";
|
||||||
|
|
||||||
|
$headers1 = exif_read_data(__DIR__ . '/bug64739.jpg');
|
||||||
|
|
||||||
|
if ($headers1 === false) {
|
||||||
|
echo 'Error, failed to read exif data';
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
var_dump($headers1['Title']{0} === '?');
|
||||||
|
var_dump($headers1['Author']{0} === '?');
|
||||||
|
|
||||||
|
ini_set('exif.decode_unicode_motorola', 'UCS-2LE');
|
||||||
|
|
||||||
|
$headers2 = exif_read_data(__DIR__ . '/bug64739.jpg');
|
||||||
|
|
||||||
|
if ($headers2 === false) {
|
||||||
|
echo 'Error, failed to read exif data';
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
var_dump($headers2['Title']);
|
||||||
|
var_dump($headers2['Author']);
|
||||||
|
|
||||||
|
?>
|
||||||
|
Done
|
||||||
|
--EXPECTF--
|
||||||
|
Test
|
||||||
|
bool(true)
|
||||||
|
bool(true)
|
||||||
|
string(8) "55845364"
|
||||||
|
string(13) "100420.000000"
|
||||||
|
Done
|
Loading…
Add table
Add a link
Reference in a new issue