[Plugin: Contact Form 7] How to fix solid black images from Really Simple CAPTCHA
-
Some of you may have noticed that Really Simple CAPTCHA (and, by extension, the CAPTCHA system in Contact Form 7) is outputting solid black images, with no visible codes on them, thus making them pretty unusable.
I traced the issue back to a function used by Really Simple CAPTCHA, and luckily, it’s easy to fix.
Go to your Plugins page and choose to “Edit” Really Simple CAPTCHA.
Find this line: imagefill( $im, 0, 0, $bg );
Replace it with this line: imagefilledrectangle($im,0,0,$this->img_size[0]-1,$this->img_size[1]-1,$bg);
Save the changes. It should be fixed.
This issue is caused by imagefill(), which was buggy in certain versions of PHP, especially the earlier 5.2.* versions. Replacing it with an equivalent imagefilledrectangle() call fixes the issue, at least until you upgrade again.
If the plugin author is reading this, please consider replacing imagefill() with imagefilledrectangle() in the plugin — imagefill() was broken in several PHP versions, while imagefilledrectangle() has always worked correctly.
- The topic ‘[Plugin: Contact Form 7] How to fix solid black images from Really Simple CAPTCHA’ is closed to new replies.