[Git][codeigniterpower/codeigniterpower][master] fix generating captcha in PHP with workaround

0 views
Skip to first unread message

Герхард PICCORO Lenz McKAY (@mckaygerhard)

unread,
Feb 6, 2024, 12:22:19 PMFeb 6
to venenux...@googlegroups.com

Герхард PICCORO Lenz McKAY pushed to branch master at codeigniterpower / codeigniterpower

Commits:

1 changed file:

Changes:

  • appsys/helpers/captcha_helper.php
    ... ... @@ -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

Reply all
Reply to author
Forward
0 new messages