fix generating captcha in PHP with workaround * allows php8 working too * https://github.com/bcit-ci/CodeIgniter/pull/6256
... | ... | @@ -278,12 +278,12 @@ if ( ! function_exists('create_captcha')) |
278 | 278 | {
|
279 | 279 | $theta += $thetac;
|
280 | 280 | $rad = $radius * ($i / $points);
|
281 | - $x = ($rad * cos($theta)) + $x_axis;
|
|
282 | - $y = ($rad * sin($theta)) + $y_axis;
|
|
281 | + $x = round(($rad * cos($theta)) + $x_axis);
|
|
282 | + $y = round(($rad * sin($theta)) + $y_axis);
|
|
283 | 283 | $theta += $thetac;
|
284 | 284 | $rad1 = $radius * (($i + 1) / $points);
|
285 | - $x1 = ($rad1 * cos($theta)) + $x_axis;
|
|
286 | - $y1 = ($rad1 * sin($theta)) + $y_axis;
|
|
285 | + $x1 = round(($rad1 * cos($theta)) + $x_axis);
|
|
286 | + $y1 = round(($rad1 * sin($theta)) + $y_axis);
|
|
287 | 287 | imageline($im, $x, $y, $x1, $y1, $colors['grid']);
|
288 | 288 | $theta -= $thetac;
|
289 | 289 | }
|
—
View it on GitLab.
You're receiving this email because of your account on gitlab.com. Manage all notifications · Help