I found a bug in Magento CE 220.127.116.11 today! I was trying to use Magento’s catalog/image helper to enlarge a series of small icons–essentially encapsulating each like a photo framing mat. The backgroundColor() method of Varien_Image_Adapter_Abstract has a comment above it declaring it a getter/setter method for the instance’s background color. A getter method provides access to an internal instance value, while a setter should allow you to set an instance’s internal value. When you call the backgroundColor() method in “get” fashion (that is, without any parameters), you should get the instance’s current background color. However what happens is that the instance’s background color is erased first, and then, it is returned. This resulted in the desired matting effect to be all black, instead of the color I specified.
I submitted the bug (registration required) to Magento tonight and I hope to hear from them soon. It’ll be great if it turns out they agree.
Leave a Reply