Bug #64684 [NEW]: FILEINFO_MIME_ENCODING fail
| From: | rg at mejoramos dot com | Date: | Sat, 20 Apr 2013 14:28:05 +0000 |
| Subject: | Bug #64684 [NEW]: FILEINFO_MIME_ENCODING fail | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-178555@lists.php.net to get a copy of this message | ||
From: rg at mejoramos dot com
Operating system: Windoqs and Linux
PHP version: 5.3.24
Package: *Directory/Filesystem functions
Bug Type: Bug
Bug description:FILEINFO_MIME_ENCODING fail
Description:
------------
If FILE have contain exactly the string:
"0"
without quotes, then:
in Windows output:
Warning: finfo_file(): Failed identify data 0:(null) in ...
in Linux output:
Warning: finfo_file() [function.finfo-file]: Failed identify data 0:(null)
in ...
Why file have a "0" ?
becouse I need read a integer in range 0-25 to take some decisions...
Why I run finfo_file() ?
Becouse I need know if last edition create UTF8 or ISO-8859-1
Test script:
---------------
echo 'Encoding:
'.finfo_file($finfo,$_FILES['name_in_FORM']['tmp_name'],FILEINFO_MIME_ENCODING);
Remember: target file contain only the string: "0" without quotes.
--
Edit bug report at https://bugs.php.net/bug.php?id=64684&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=64684&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=64684&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=64684&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=64684&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=64684&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=64684&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=64684&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=64684&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=64684&r=support
Expected behavior: https://bugs.php.net/fix.php?id=64684&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=64684&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=64684&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=64684&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64684&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=64684&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=64684&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=64684&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=64684&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=64684&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=64684&r=mysqlcfg