mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-26 01:43:06 +03:00
Sometimes captcha generates an error if the session is accessed after there is some output in the response. From now on the captcha phrase will be saved first and then there will be the image output.
This commit is contained in:
parent
0b43e4d918
commit
f88c6cb898
1 changed files with 2 additions and 1 deletions
|
@ -32,8 +32,9 @@ class Captcha extends CI_Controller {
|
|||
public function index() {
|
||||
header('Content-type: image/jpeg');
|
||||
$builder = new Gregwar\Captcha\CaptchaBuilder;
|
||||
$builder->build()->output();
|
||||
$builder->build();
|
||||
$this->session->set_userdata('captcha_phrase', $builder->getPhrase());
|
||||
$builder->output();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue