Skip to content

Commit

Permalink
Merge pull request bcit-ci#6256 from Khuthaily/patch-2
Browse files Browse the repository at this point in the history
fix generating captcha in PHP 8.1
  • Loading branch information
proclame committed May 22, 2024
1 parent c83dd97 commit fca26fc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions system/helpers/captcha_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,12 @@ function create_captcha($data = '', $img_path = '', $img_url = '', $font_path =
{
$theta += $thetac;
$rad = $radius * ($i / $points);
$x = ($rad * cos($theta)) + $x_axis;
$y = ($rad * sin($theta)) + $y_axis;
$x = round(($rad * cos($theta)) + $x_axis);
$y = round(($rad * sin($theta)) + $y_axis);
$theta += $thetac;
$rad1 = $radius * (($i + 1) / $points);
$x1 = ($rad1 * cos($theta)) + $x_axis;
$y1 = ($rad1 * sin($theta)) + $y_axis;
$x1 = round(($rad1 * cos($theta)) + $x_axis);
$y1 = round(($rad1 * sin($theta)) + $y_axis);
imageline($im, $x, $y, $x1, $y1, $colors['grid']);
$theta -= $thetac;
}
Expand Down

0 comments on commit fca26fc

Please sign in to comment.