Edit report at http://bugs.php.net/bug.php?id=54016&edit=1
ID: 54016 Patch added by: bj...@php.net Reported by: bj...@php.net Summary: finfo_file: Cannot determine filetype in archives Status: Open Type: Bug Package: Filesystem function related Operating System: Linux PHP Version: 5.3.5 Block user comment: N Private report: N New Comment: 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 Previous Comments: ------------------------------------------------------------------------ [2011-02-14 16:20:55] bj...@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