php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80594 MP3 file detected as application/x-font-gdos
Submitted: 2021-01-05 15:48 UTC Modified: 2024-05-24 21:44 UTC
Votes:10
Avg. Score:4.4 ± 0.8
Reproduced:9 of 9 (100.0%)
Same Version:8 (88.9%)
Same OS:7 (77.8%)
From: cmb@php.net Assigned: nielsdos (profile)
Status: Closed Package: Filesystem function related
PHP Version: 7.4.14RC1 OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
40 + 47 = ?
Subscribe to this entry?

 
 [2021-01-05 15:48 UTC] cmb@php.net
Description:
------------
I'm forwarding this from another ticket[1].

A sample MP3 file[2] is erroneously detected as
application/x-font-gdos instead of audio/mpeg with PHP-7.4, but
not with PHP-7.3 nor PHP-8.0.

[1] <https://bugs.php.net/79681#1605807139>
[2] <https://drive.google.com/file/d/1QrF9iZBjmfgZGvOjrSVORfM6uI-nyidX/view?usp=sharing>


Test script:
---------------
<?php

var_dump(mime_content_type('test_file.mp3'));


Expected result:
----------------
string(10) "audio/mpeg"


Actual result:
--------------
string(23) "application/x-font-gdos"

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2024-05-24 21:44 UTC] nielsdos@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: nielsdos
 [2024-05-24 21:44 UTC] nielsdos@php.net
This no longer reproduces in the currently lowest-supported bugfix version (PHP 8.2). This must've been fixed between PHP 7.4 and PHP 8.2. So I'm closing this now.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 16 21:01:29 2024 UTC