Bug #77784 [NEW]: mime_content_type result gets doubled for xlsx

From: Date: Sat, 23 Mar 2019 10:29:42 +0000
Subject: Bug #77784 [NEW]: mime_content_type result gets doubled for xlsx
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-220147@lists.php.net to get a copy of this message
From:             dpoddubny at gmail dot com
Operating system: linux
PHP version:      7.3.3
Package:          Filesystem function related
Bug Type:         Bug
Bug description:mime_content_type result gets doubled for xlsx

Description:
------------
Hello. Starting from php 7.3.2 function mime_content_type doubles the
result for xlsx files created in LibreOffice (6.0.7.3). While php 7.3.1
works correctly.


Test script:
---------------
How to reproduce:
1. git clone
https://github.com/karser/php_bug_mime_content_type_doubles_result

2. Build the image and see the bug:

docker build --no-cache --build-arg PHP_VER=7.3.2 .

Step 5/5 : RUN php -r "var_dump(mime_content_type('/test.xlsx'));"
 ---> Running in 71f6655ae0ed
string(130)
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet"


docker build --no-cache --build-arg PHP_VER=7.3.1 .

Step 5/5 : RUN php -r "var_dump(mime_content_type('/test.xlsx'));"
 ---> Running in 27e744a45920
string(65)
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"


Expected result:
----------------
mime_content_type('/test.xlsx') returns
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"

Actual result:
--------------
mime_content_type('/test.xlsx') returns
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet"

-- 
Edit bug report at https://bugs.php.net/bug.php?id=77784&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=77784&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=77784&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=77784&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=77784&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=77784&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=77784&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=77784&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=77784&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=77784&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=77784&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=77784&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=77784&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=77784&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77784&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=77784&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=77784&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=77784&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=77784&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=77784&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=77784&r=mysqlcfg



Thread (18 messages)

« previous php.bugs (#220147) next »