ID:               15797
 Comment by:       antoine at rezo dot net
 Reported By:      mark at tapinternet dot com
 Status:           Closed
 Bug Type:         GD related
 Operating System: linux
 PHP Version:      4.0.6
 New Comment:

This bug is supposedly fixed, but we hase users complaining about it in
more recent versions of PHP.

See :
- v4.1.2:
http://listes.rezo.net/archives/spip-dev/2003-03/msg00224.html
- v4.2.0:
http://listes.rezo.net/archives/spip-dev/2003-03/msg00226.html

With this bug it is impossible to write portable programs. What is your
suggestion for circumventing it ? I know of no way to detect the GD
version.


Previous Comments:
------------------------------------------------------------------------

[2002-02-28 18:09:03] [EMAIL PROTECTED]

This bug has been fixed in CVS.



------------------------------------------------------------------------

[2002-02-28 17:51:32] mark at tapinternet dot com

The function ImageCreateTrueColor() will cause a fatal error when it
detects that an incorrect version of GD is installed.  Since the php
code cannot investigate which version of GD is installed before this
call is made, this makes it impossible to create applications which can
gracefully degrade depending on the version of GD installed.  The fatal
error is inconsistent with the warnings that are returned when GIF,PNG,
or JPEG support is not compiled into GD.  The return value for all
these functions should be a warning to allow maximum flexibility to the
programmer.

if (! $Image = ImageCreateTrueColor($w,$h)) {
        $Image = ImageCreate($w,$h);
}

It is not possible to execute the above code because the fatal error
when GD 2.0 is not installed will cease execution of the code.

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=15797&edit=1

Reply via email to