desirepath41 / visualCaptcha-PHP

visualCaptcha for PHP
MIT License
101 stars 29 forks source link

Fails to render if PHP module open_ssl is not present. #23

Open CaMer0n opened 7 years ago

CaMer0n commented 7 years ago

PHP Fatal error: Call to undefined function visualCaptcha\openssl_random_pseudo_bytes() in D:\Documents\UniServerZ\www\visualCaptcha\vendor\emotionloop\visualcaptcha\src\visualCaptcha\Captcha.php on line 223, referer: http://localhost/visualCaptcha/public/

Perhaps some kind of warning could be added?

BrunoBernardino commented 7 years ago

I think I'd prefer adding it as a requirement in the README than having to deal with it not existing, etc.

If you think that makes sense, I'd gladly accept a PR for that! :D

CaMer0n commented 7 years ago

ReadMe works too. Or there's this:

if (!extension_loaded('openssl'))
{
    echo "openssl extension is required.";
}