From:             [EMAIL PROTECTED]
Operating system: linux
PHP version:      4.0.6
PHP Bug Type:     GD related
Bug description:  Inconsistent Error Behavior.

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 bug report at http://bugs.php.net/?id=15797&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=15797&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=15797&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=15797&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=15797&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=15797&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=15797&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=15797&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=15797&r=submittedtwice

Reply via email to