Bug #60250 [Opn->Nab]: "FILE" section argument ignored

From: Date: Wed, 03 Aug 2016 03:49:29 +0000
Subject: Bug #60250 [Opn->Nab]: "FILE" section argument ignored
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-202852@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 Updated by: kalle@php.net Reported by: admin at eexit dot net Summary: "FILE" section argument ignored -Status: Open +Status: Not a bug 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: Thank you for taking the time to report a problem with PHP. Unfortunately you are not using a current version of PHP -- the problem might already be fixed. Please download a new PHP version from http://www.php.net/downloads.php If you are able to reproduce the bug with one of the latest versions of PHP, please change the PHP version on this bug report to the version you tested and change the status back to "Open". Again, thank you for your continued support of PHP. Previous Comments: ------------------------------------------------------------------------ [2013-10-18 21:59:58] rimantas dot ragainis at gmail dot com 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) ------------------------------------------------------------------------ [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

« previous php.bugs (#202852) next »