Moving the "reload without as_url" exception to catch more cases (see

This commit is contained in:
Gregwar
2013-08-07 10:56:49 +02:00
parent 5efb9a73b5
commit 7f30646c68
2 changed files with 4 additions and 4 deletions

View File

@ -90,6 +90,10 @@ class CaptchaType extends AbstractType
{
$isHuman = false;
if ($options['reload'] && !$options['as_url']) {
throw new \InvalidArgumentException('GregwarCaptcha: The reload option cannot be set without as_url, see the README for more information');
}
if ($options['humanity'] > 0) {
$humanityKey = $this->key.'_humanity';
if ($this->session->get($humanityKey, 0) > 0) {