Bug #60250 [Com]: "FILE" section argument ignored
| From: | rimantas dot ragainis at gmail dot com | Date: | Fri, 18 Oct 2013 21:59:58 +0000 |
| Subject: | Bug #60250 [Com]: "FILE" section argument ignored | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-182340@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60250&edit=1
ID: 60250
Comment by: rimantas dot ragainis at gmail dot com
Reported by: admin at eexit dot net
Summary: "FILE" section argument ignored
Status: Open
Type: Bug
Package: EXIF related
Operating System: OSX 10.6.8
PHP Version: 5.3.8
Block user comment: N
Private report: N
New Comment:
It does not apply to FILE section only, it appears parameter $sections of function exif_read_data()
is not handled properly. In every case the result was returned as the whole EXIF data ignoring
desirable section(s): FILE, IFD0, EXIF, GPS, etc. The result was the same no matter whether passed
as single string, comma separated string of these sections, integer 0 or NULL. I've tried on
the following environments which led me to this conclusion:
* OSX 10.8.5 Darwin 12.5.0, PHP 5.4.16, EXIF 1.4 (supported 0220)
* Win 7 Ultimate 6.1.7601, PHP 5.4.7, EXIF 1.4 (supported 0220)
* Red Hat Enterprise Linux 5 2.6.18-194.el5, PHP 5.3.25, EXIF 1.4 (supported 0220)
* Ubuntu 2.6.38-8-server, PHP 5.3.5-1ubuntu7.8, EXIF 1.4 (supported 0220)
Previous Comments:
------------------------------------------------------------------------
[2011-11-09 09:35:00] admin at eexit dot net
Description:
------------
Hello,
According to the documentation, the exif_read_data() allows to speficy the section
we want to return.
It seems the section argument "FILE" is not being considered and return the same
result if 0 argument was given.
Extension informations:
EXIF Version: 1.4 $Id: exif.c 314376 2011-08-06 14:47:44Z felipe $
Supported EXIF: Version 0220
Supported filetypes: JPEG,TIFF
Test script:
---------------
<?php
var_dump(exif_read_data(__DIR__ . 'sample-1.jpg', 'FILE', true));
?>
Expected result:
----------------
array(1) {
["FILE"]=>
array(6) {
["FileName"]=>
string(12) "sample-1.jpg"
["FileDateTime"]=>
int(1320829793)
["FileSize"]=>
int(162)
["FileType"]=>
int(2)
["MimeType"]=>
string(10) "image/jpeg"
["SectionsFound"]=>
string(0) "COMPUTED"
}
}
Actual result:
--------------
array(2) {
["FILE"]=>
array(6) {
["FileName"]=>
string(12) "sample-1.jpg"
["FileDateTime"]=>
int(1320829793)
["FileSize"]=>
int(162)
["FileType"]=>
int(2)
["MimeType"]=>
string(10) "image/jpeg"
["SectionsFound"]=>
string(0) ""
}
["COMPUTED"]=>
array(4) {
["html"]=>
string(22) "width="10" height="10""
["Height"]=>
int(10)
["Width"]=>
int(10)
["IsColor"]=>
int(0)
}
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60250&edit=1