Bug #15288 Updated: Image*-functions being avail even if they're not implemented by gd
| From: | derick@php.net | Date: | Wed, 30 Jan 2002 13:51:11 +0000 |
| Subject: | Bug #15288 Updated: Image*-functions being avail even if they're not implemented by gd | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-78556@lists.php.net to get a copy of this message | ||
ID: 15288
Updated by: derick
Old Summary: Image*-functions being avail even if they're not
implemented by gd
Reported By: matslin@orakel.ntnu.no
Old Status: Open
Status: Feedback
Bug Type: Feature/Change Request
Operating System: All
PHP Version: 4.1.1
New Comment:
I'm +1 on your patch as well, can you make it against the latest CVS
version?
I'll make sure it gets committed then.
regards,
Derick
Previous Comments:
------------------------------------------------------------------------
[2002-01-30 08:47:03] matslin@orakel.ntnu.no
This is excactly the point i'm trying to make. To me it seems like the
most logical thing would be to not implement the function at all, since
this would make function_exists() work as expected. Implementing the
function (to give an error message) - even though its not available
seems kinda useless, since this also makes it harder to make a general
solution.
------------------------------------------------------------------------
[2002-01-30 08:13:23] mfischer@php.net
This one seems really a mess to me (declaring function which output
"not implemented") when we have 'function_exists()'.
Reopening for discussion.
------------------------------------------------------------------------
[2002-01-30 07:39:49] matslin@orakel.ntnu.no
.. this does however not cover the TTF*-functions.
------------------------------------------------------------------------
[2002-01-29 23:06:03] cardinal@php.net
There is already a clean way to check which image formats are
supported:
http://www.php.net/manual/en/function.imagetypes.php
------------------------------------------------------------------------
[2002-01-29 20:53:30] matslin@orakel.ntnu.no
The Image*-functions specific for different formats are available even
if they're not supported in GD. Even though this is understandable, a
better practice would probably be to disable these functions, since
they're not available.(so they can be checked for existance in runtime,
instead of relying on errors passed back from gd)
It shouldnt be much of a change, since i was able to create the desired
effect using a few #ifdef's - and i've only got spare knowledge of c.
http://software.e-mats.org/patches/gd_4.1.1.diff
contains the diff for
the gd.c-file from 4.1.1. that i used for testing.
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=15288&edit=1