Update TextCaptcha.php

This commit is contained in:
Roman Kelesidis 2025-03-08 20:03:38 +03:00
commit 95cef6a8e6

View file

@ -34,7 +34,6 @@ class TextCaptcha implements CaptchaInterface
*/
public function __construct(array $settings)
{
session_unset();
session_start();
$this->settings = $settings;
@ -48,6 +47,7 @@ class TextCaptcha implements CaptchaInterface
*/
public function get(): string
{
$_SESSION['phrase'] = $this->captcha->getPhrase();
$this->captcha->build();
return "
<img src=" . $this->captcha->inline() . " /><br />