Bug #77784 [Opn->Ver]: mime_content_type result gets doubled for xlsx

From: Date: Wed, 17 Apr 2019 15:42:23 +0000
Subject: Bug #77784 [Opn->Ver]: mime_content_type result gets doubled for xlsx
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-220510@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77784&edit=1 ID: 77784 Updated by: cmb@php.net Reported by: dpoddubny at gmail dot com Summary: mime_content_type result gets doubled for xlsx -Status: Open +Status: Verified Type: Bug Package: Filesystem function related Operating System: linux PHP Version: 7.3.3 Block user comment: N Private report: N New Comment: I can reproduce this with the provided .xlsx, but not with arbitrary LibreOffice .xlsx files. The behavioral change is most likely caused by the upgrade to 5.34[1]. [1] <http://git.php.net/?p=php-src.git;a=commit;h=d874d4a15c2e17a753d580691906c95e9153b823> Previous Comments: ------------------------------------------------------------------------ [2019-03-23 10:29:42] dpoddubny at gmail dot com 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 this bug report at https://bugs.php.net/bug.php?id=77784&edit=1

« previous php.bugs (#220510) next »