Bug #54016 [Asn->Csd]: finfo_file: Cannot determine filetype in archives
| From: | bjori@php.net | Date: | Wed, 30 Mar 2011 10:39:14 +0000 |
| Subject: | Bug #54016 [Asn->Csd]: finfo_file: Cannot determine filetype in archives | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-159844@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=54016&edit=1
ID: 54016
Updated by: bjori@php.net
Reported by: bjori@php.net
Summary: finfo_file: Cannot determine filetype in archives
-Status: Assigned
+Status: Closed
Type: Bug
Package: Filesystem function related
Operating System: Linux
PHP Version: 5.3.5
Assigned To: bjori
Block user comment: N
Private report: N
New Comment:
Forgot to close this report.. already fixed in the 5.3.6
Previous Comments:
------------------------------------------------------------------------
[2011-02-14 16:34:06] bjori@php.net
Automatic comment from SVN on behalf of bjori
Revision: http://svn.php.net/viewvc/?view=revision&revision=308328
Log: bfn for #54016
------------------------------------------------------------------------
[2011-02-14 16:32:05] bjori@php.net
Automatic comment from SVN on behalf of bjori
Revision: http://svn.php.net/viewvc/?view=revision&revision=308327
Log: Bug#54016 (finfo_file() Cannot determine filetype in archives)
------------------------------------------------------------------------
[2011-02-14 16:21:14] bjori@php.net
The following patch has been added/updated:
Patch Name: finfo.patch
Revision: 1297696874
URL:
http://bugs.php.net/patch-display.php?bug=54016&patch=finfo.patch&revision=1297696874
------------------------------------------------------------------------
[2011-02-14 16:20:55] bjori@php.net
Description:
------------
finfo_file() does not support stream wrappers, such as zip://, even
though it has
stream context option :(
Test script:
---------------
<?php
$fp = finfo_open(FILEINFO_MIME_TYPE);
$png = "zip://" . __DIR__ . "/resources/dir.zip#dir/test.png"
var_dump(finfo_file($fp, $png));
Expected result:
----------------
string(9) "image/png"
Actual result:
--------------
PHP Warning: finfo_file(): File or path not found
'zip:///home/bjori/Work/OSS/svn-php/php/php-
src/branches/PHP_5_3/ext/fileinfo/tests/resources/dir.zip#dir/test.png'
in
/home/bjori/Work/OSS/svn-php/php/php-src/branches/PHP_5_3/t.php on line
5
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=54016&edit=1