ZF-10627: Captcha string out of image
Sometimes captcha string is printed out of image so it is not visible.
class: Zend_Captcha_Image line 488: imagefilledrectangle($img, 0, 0, $w-1, $h-1, $bg_color); $textbox = imageftbbox($fsize, 0, $font, $word); $x = ($w - ($textbox - $textbox)) / 2; $y = ($h - ($textbox - $textbox)) / 2;
Don`t now why but sometimes $x gets huge value over 1000000. Probably there is some bug in imageftbbox function. I found that many other developers have same problem with captcha. Protection for $x value (maybe y also) will be very helpful because we (developers) do not have any possibility to protect our code. As result we get image with dots and lines but without any code.