php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #76690 mime_content_type's return type is not correctly documented
Submitted: 2018-08-01 07:09 UTC Modified: 2018-08-01 12:20 UTC
From: magnar at myrtveit dot com Assigned: cmb (profile)
Status: Closed Package: Documentation problem
PHP Version: 7.2.8 OS: Any
Private report: No CVE-ID: None
 [2018-08-01 07:09 UTC] magnar at myrtveit dot com
Description:
------------
---
From manual page: http://www.php.net/function.mime-content-type
---
The return value is documented as "Returns the content type in MIME format, like text/plain or application/octet-stream." However, mime_content_type returns false on failure, as is evident from this test: https://3v4l.org/epEUd

Test script:
---------------
var_dump(mime_content_type('foo'));


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-08-01 11:55 UTC] cmb@php.net
-Status: Open +Status: Verified
 [2018-08-01 12:20 UTC] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&revision=345416
Log: Fix #76690: mime_content_type's return type is not correctly documented
 [2018-08-01 12:20 UTC] cmb@php.net
-Status: Verified +Status: Closed -Assigned To: +Assigned To: cmb
 [2018-08-01 12:20 UTC] cmb@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 [2018-08-02 06:31 UTC] magnar at myrtveit dot com
Thanks for your quick response! An "Errors/Exceptions" section stating that "Upon failure, an E_WARNING is emitted." should also be added. Similar to http://www.php.net/function.filemtime.php
 [2018-08-02 22:49 UTC] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&revision=345422
Log: Fix #76690: mime_content_type's return type is not correctly documented (2)

We also note that a warning is emitted on failure.
 [2020-02-07 06:05 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=909d082485fac43ec96a4d84440652ee5479537a
Log: Fix #76690: mime_content_type's return type is not correctly documented (2)
 [2020-02-07 06:05 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=37b2a90a5d236847c4f7da43706e2cfb0b0e3767
Log: Fix #76690: mime_content_type's return type is not correctly documented
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 26 14:01:32 2024 UTC