Bug #79394 [NEW]: mime_content_type Reporting Incorrectly Returning application/zlib

From: Date: Wed, 18 Mar 2020 14:40:08 +0000
Subject: Bug #79394 [NEW]: mime_content_type Reporting Incorrectly Returning application/zlib
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-226158@lists.php.net to get a copy of this message
From: scott dot newman at faa dot gov Operating system: Red Hat 7.7 PHP version: Irrelevant Package: Filesystem function related Bug Type: Bug Bug description:mime_content_type Reporting Incorrectly Returning application/zlib Description: ------------ PHP Version is 7.1.23 but the drop down wouldn't let me select it. Version 7.1.23 is the version that's in the repository for RedHat 7 so I think it's still relevant. To reproduce: 1) Create a text file that has content starting with "HK". 2) Use the PHP function "mime_content_type" to display the mime type. 3) The function incorrectly reports "application/zlib". Test script: --------------- <?php var_dump(mime_content_type("file.txt")); ?> Expected result: ---------------- application/zlib is reported instead of text/plain. -- Edit bug report at https://bugs.php.net/bug.php?id=79394&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=79394&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=79394&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=79394&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=79394&r=needscript Try newer version: https://bugs.php.net/fix.php?id=79394&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=79394&r=support Expected behavior: https://bugs.php.net/fix.php?id=79394&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=79394&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=79394&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=79394&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=79394&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=79394&r=dst IIS Stability: https://bugs.php.net/fix.php?id=79394&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=79394&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=79394&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=79394&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=79394&r=mysqlcfg

« previous php.bugs (#226158) next »