#20094 [Csd->Opn]: image_type_to_mime_type() has wrong proto in php source
| From: | philip@php.net | Date: | Fri, 08 Nov 2002 02:53:30 +0000 |
| Subject: | #20094 [Csd->Opn]: image_type_to_mime_type() has wrong proto in php source | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-24318@lists.php.net to get a copy of this message | ||
ID: 20094
Updated by: philip@php.net
-Summary: image_type_to_mime_type() missing from docs
Reported By: leon@leonatkinson.com
-Status: Closed
+Status: Open
-Bug Type: Documentation problem
+Bug Type: *Graphics related
PHP Version: 4.3.0-pre1
New Comment:
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.
php4/ext/standard/image.c
{{{ 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);
Previous Comments:
------------------------------------------------------------------------
[2002-11-07 20:13:53] helly@php.net
Function is added at least in online help.
------------------------------------------------------------------------
[2002-10-25 13:06:51] leon@leonatkinson.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"
print(image_type_to_mime_type(IMAGETYPE_GIF));
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20094&edit=1