Skip to content

Commit

Permalink
PHP 8.1 support (alextselegidis#1209)
Browse files Browse the repository at this point in the history
  • Loading branch information
alextselegidis committed Feb 23, 2022
1 parent 9d8a0c5 commit 48ddcf3
Show file tree
Hide file tree
Showing 2 changed files with 819 additions and 4 deletions.
17 changes: 13 additions & 4 deletions application/controllers/Captcha.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,24 @@
* @package Controllers
*/
class Captcha extends EA_Controller {
/**
* Class Constructor
*/
public function __construct()
{
parent::__construct();

$this->load->library('captcha_builder');
}

/**
* Make a request to this method to get a captcha image.
*/
public function index()
{
header('Content-type: image/jpeg');
$builder = new Gregwar\Captcha\CaptchaBuilder;
$builder->build();
$this->session->set_userdata('captcha_phrase', $builder->getPhrase());
$builder->output();
$this->captcha_builder->build();
$this->session->set_userdata('captcha_phrase', $this->captcha_builder->getPhrase());
$this->captcha_builder->output();
}
}
Loading

0 comments on commit 48ddcf3

Please sign in to comment.