One more fix in generate method
This commit is contained in:
parent
3ecbec4ae6
commit
eb97a9c0af
|
@ -149,8 +149,8 @@ class CaptchaType extends AbstractType
|
||||||
|
|
||||||
private function generateCaptchaValue()
|
private function generateCaptchaValue()
|
||||||
{
|
{
|
||||||
if ($this->session->has($this->key)) {
|
if (!$this->session->has($this->key)) {
|
||||||
$value = $this->session->get($this->key);
|
$value = '';
|
||||||
$charset = 'abcdefhjkmnprstuvwxyz23456789';
|
$charset = 'abcdefhjkmnprstuvwxyz23456789';
|
||||||
$chars = str_split($charset);
|
$chars = str_split($charset);
|
||||||
|
|
||||||
|
@ -159,6 +159,8 @@ class CaptchaType extends AbstractType
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->session->set($this->key, $value);
|
$this->session->set($this->key, $value);
|
||||||
|
} else {
|
||||||
|
$value = $this->session->get($this->key);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $value;
|
return $value;
|
||||||
|
|
Loading…
Reference in New Issue