|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20094 image_type_to_mime_type() has wrong proto in php source
Submitted: 2002-10-25 13:06 UTC Modified: 2002-11-07 21:04 UTC
From: leon at leonatkinson dot com Assigned:
Status: Closed Package: *Graphics related
PHP Version: 4.3.0-pre1 OS:
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.
Block user comment
Status: Assign to:
Bug Type:
From: leon at leonatkinson dot com
New email:
PHP Version: OS:


 [2002-10-25 13:06 UTC] leon at leonatkinson dot com
Please add php_image_type_to_mime_type() to the documentation.

array image_type_to_mime_type(int imagetype)
Convert internal image_type to mime type

    //returns "image/gif"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-07 20:13 UTC]
Function is added at least in online help.
 [2002-11-07 20:53 UTC]
It's currently documented BUT there is a discrepancy.  According to the php4 proto, it returns an array.  According to the code, docs and examples, it returns a string.  The proto in image.c needs to be updated.  Opening as a graphics related bug.

{{{ proto array image_type_to_mime_type(int imagetype)
ZVAL_STRING(return_value, (char*)php_image_type_to_mime_type(Z_LVAL_PP(p_image_type)), 1);
 [2002-11-07 21:04 UTC]
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at
In case this was a documentation problem, the fix will show up soon at

In case this was a website problem, the change will show
up on the site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jun 25 21:01:29 2024 UTC