Re: bug in Cache/Graphics.php

From: Date: Sun, 23 Sep 2001 21:32:59 +0000
Subject: Re: bug in Cache/Graphics.php
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-1997@lists.php.net to get a copy of this message
On Sun, 23 Sep 2001, Martin Jansen wrote: >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. All function names should be lowercased. And this is the case for GD extension at least. They are only mixed case in the manual. Don't believe everything you read in the manual..use the source. :) --Jani

« previous php.pear.dev (#1997) next »