Doc #76690 [Com]: mime_content_type's return type is not correctly documented

From: Date: Thu, 02 Aug 2018 06:31:44 +0000
Subject: Doc #76690 [Com]: mime_content_type's return type is not correctly documented
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-15943@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76690&edit=1 ID: 76690 Comment by: magnar at myrtveit dot com Reported by: magnar at myrtveit dot com Summary: mime_content_type's return type is not correctly documented Status: Closed Type: Documentation Problem Package: Documentation problem Operating System: Any PHP Version: 7.2.8 Assigned To: cmb Block user comment: N Private report: N New Comment: 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 Previous Comments: ------------------------------------------------------------------------ [2018-08-01 12:20:55] 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-01 12:20:01] 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 07:09:34] 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')); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=76690&edit=1

« previous php.doc.bugs (#15943) next »