Skip to content

Commit

Permalink
Merge pull request #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
gxgpet committed Feb 10, 2024
2 parents ae7b30f + c0b8c6e commit 70d0a0e
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 @@ -297,12 +297,12 @@ function create_captcha($data)
{
$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 70d0a0e

Please sign in to comment.