Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.4.0

Bug #5325 Image/Color.php compatibility with old PHP versions
Submitted: 2005-09-07 19:46 UTC
From: gjepperson at bankaf dot com Assigned: nosey
Status: Closed Package: Image_Canvas
PHP Version: 4.2.2 OS: irrelevant
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 22 - 16 = ?

 
 [2005-09-07 19:46 UTC] gjepperson at bankaf dot com
Description: ------------ In Image/Color.php line 64 in function allocateColor, you have a function call to imagecolorallocatealpha which doesn't exist in PHP 4.2.2. It would be nice if you checked if the function exists first and handle the error gracefully. Thanks!

Comments

 [2005-09-11 05:17 UTC] drewish at php dot net
Hey are you sure this is an Image_Color bug? We don't call imagecolorallocatealpha(). I think that this might be an Image_Canvas bug. Their Image_Canvas_Color class extends Image_Color and makes a call to imagecolorallocatealpha() though it's on line 67. If you still think this is an Image_Color bug, it would be helpful to have a backtrace to see what's going on behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php
 [2005-09-14 00:13 UTC] drewish at php dot net
I'm passing this one to you guys...
 [2005-09-14 17:26 UTC] nosey
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. It is true there is a call to "imagecolorallocatealpha", and I have added a call to function_exists() to check for availability, so if this bug is in anyway related to Image_Canvas it has now been fixed... /Jesper