php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #49591 Fileinfo example code uses wrong constant
Submitted: 2009-09-18 15:15 UTC Modified: 2009-09-22 09:39 UTC
From: mike at silverorange dot com Assigned: vrana (profile)
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS: Irrelevant
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mike at silverorange dot com
New email:
PHP Version: OS:

 

 [2009-09-18 15:15 UTC] mike at silverorange dot com
Description:
------------
On this page http://php.net/manual/en/function.finfo-file.php the example uses the wrong constant.

The constant is FILEINFO_MIME, not FILEINFO_MIME_TYPE.




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-09-20 18:12 UTC] kalle@php.net
Theres a difference between FILEINFO_MIME and FILEINFO_MIME_TYPE:

* FILEINFO_MIME returns the mimetype
* FILEINFO_MIME_TYPE returns the type and mime encoding as per RFC 2045

I think its intended usage of FILEINFO_MIME_TYPE, but I'll assign it to the original author of the example to clarify this.
 [2009-09-22 09:39 UTC] vrana@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Kalle is right.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Oct 27 00:01:26 2020 UTC