Skip to content

Commit

Permalink
fix generating captcha in PHP with workaround
Browse files Browse the repository at this point in the history
* allows php8 working too
* bcit-ci/CodeIgniter#6256
  • Loading branch information
mckaygerhard committed Feb 6, 2024
1 parent 6530fd6 commit 0175908
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions appsys/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 0175908

Please sign in to comment.