From c30852919127f526342ec01c7a112f70c1d43c88 Mon Sep 17 00:00:00 2001 From: Sergey <31823239+SeAnSolovev@users.noreply.github.com> Date: Tue, 7 Mar 2023 02:01:09 +0300 Subject: [PATCH] Fix captcha php 8.1/8.2 PHP Deprecated: Implicit conversion from float 35.6 to int loses precision in /system/library/system.php on line 743; PHP Deprecated: Implicit conversion from float 31.6 to int loses precision in /system/library/system.php on line 743; --- system/library/system.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/library/system.php b/system/library/system.php index 7535176..cfb4636 100644 --- a/system/library/system.php +++ b/system/library/system.php @@ -740,7 +740,7 @@ { $color = imagecolorallocatealpha($src, $colors[rand(0,sizeof($colors)-1)], $colors[rand(0,sizeof($colors)-1)], $colors[rand(0,sizeof($colors)-1)], rand(20,40)); $char = $chars[rand(0, sizeof($chars)-1)]; - $size = rand($font_size*2.1-2, $font_size*2.1+2); + $size = rand($font_size*((int) 2.1)-2, $font_size*((int) 2.1)+2); $x = ($i+1)*$font_size + rand(6,8); $y = (($height*2)/3) + rand(3,7);