#20094 [Opn->Csd]: image_type_to_mime_type() has wrong proto in php source
| From: | iliaa@php.net | Date: | Fri, 08 Nov 2002 03:04:47 +0000 |
| Subject: | #20094 [Opn->Csd]: 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-24319@lists.php.net to get a copy of this message | ||
ID: 20094
Updated by: iliaa@php.net
Reported By: leon@leonatkinson.com
-Status: Open
+Status: Closed
Bug Type: *Graphics related
PHP Version: 4.3.0-pre1
New Comment:
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 http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2002-11-07 20:53:29] philip@php.net
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);
------------------------------------------------------------------------
[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