Skip to content

Commit

Permalink
馃悰 BASE #280 PHP 8.2 corre莽茫o include arquivos
Browse files Browse the repository at this point in the history
  • Loading branch information
bjverde committed Feb 20, 2023
1 parent 316e37b commit 3271757
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions base/classes/captcha/CaptchaSecurityImages.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
Copyrigth (C) White Hat Web Design - http://www.white-hat-web-design.co.uk/
*/

require_once '../constants.php';
require_once '../helpers/autoload_formdin_helper.php';

session_start(); // tem que inicializar a sess茫o, sen茫o n茫o funciona
class CaptchaSecurityImages {
var $font = __DIR__.'/fonts/monofont.ttf';
Expand Down Expand Up @@ -44,6 +47,7 @@ function __construct($width='120',$height='30',$characters='6') {
$textbox = imagettfbbox($font_size, 0, $this->font, $code) or die('Error in imagettfbbox function');
$x = ($width - $textbox[4])/2;
$y = ($height - $textbox[5])/2;
$font_size = (float) $font_size;
imagettftext($image, $font_size, 0, $x, $y, $text_color, $this->font , $code) or die('Error in imagettftext function');
/* output captcha image to browser */
header('Content-Type: image/jpeg');
Expand Down

0 comments on commit 3271757

Please sign in to comment.