Re: bug in Cache/Graphics.php
| From: | Martin Jansen | Date: | Sun, 23 Sep 2001 15:55:52 +0000 |
| Subject: | Re: bug in Cache/Graphics.php | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-1996@lists.php.net to get a copy of this message | ||
On Sun, 23 Sep 2001 17:46:11 +0200, Tomas V.V.Cox wrote:
>Martin Jansen wrote:
>>
>> On Sun, 23 Sep 2001 09:17:18 +0200, Andreas Kossmeier wrote:
>>
>> >line 238 (and 293) in Cache/Graphics.php
>> >
>> >: // generate the image
>> >: $func = 'Image' . strtoupper($format);
>> >: $func($img);
>> >: ImageDestroy($img);
>> >
>
>At least a is_function($func) would be more than recomended.
Yeah, but that does not solve the problem when the image type
is 'JPG'.
>In the
>other hand, PHP use case insensitive function names so the strtoupper is
>not needed.
IIRC there were discussions some time ago on php-dev about changing the
language parser in order to be case sensitive. So it isn't a good idea
to work with imagejpeg, imagegif etc.
- Martin