Support » Plugins and Hacks » Contact Form 7 » [Plugin: Contact Form 7] How to fix solid black images from Really Simple CAPTCHA

  • Resolved dawnmew

    (@dawnmew)


    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.

    http://wordpress.org/extend/plugins/contact-form-7/

Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Contact Form 7] How to fix solid black images from Really Simple CAPTCHA’ is closed to new replies.