cool-php-captcha icon indicating copy to clipboard operation
cool-php-captcha copied to clipboard

Fix for image generation fails

Open jesobreira opened this issue 9 years ago • 2 comments

Fixed a few bugs:

  • Image generation fails if the session was started previously, before including the captcha.php script
  • Image generation fails if captcha.php is included from a different folder

jesobreira avatar Mar 13 '16 16:03 jesobreira

well, PHP is already doing this automatically with sufficient error_reporting, not sure it's a good idea to do it manually/explicitly (for no good reason i can think of)

divinity76 avatar Mar 14 '16 10:03 divinity76

About the first item... I think it shall be done since develop with error_reporting set to hide errors is always a bad practice, and we can't let people develop hiding errors just to see the captcha when their project is still under development. Also, I'm not removing the error manually. I'm just verifying if any session was started before starting.

About the second, I think it's really a bug.

jesobreira avatar Mar 15 '16 02:03 jesobreira