Bug #54016 [PATCH]: finfo_file: Cannot determine filetype in archives

From: Date: Mon, 14 Feb 2011 15:21:14 +0000
Subject: Bug #54016 [PATCH]: finfo_file: Cannot determine filetype in archives
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-158769@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 Patch added by: bjori@php.net Reported by: bjori@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] 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

« previous php.bugs (#158769) next »