From ec4e4301122220174713d4f92a9c2558eec77e19 Mon Sep 17 00:00:00 2001 From: Ignacio Larrain Date: Fri, 29 Apr 2022 04:11:33 -0400 Subject: [PATCH] Explicit float to int conversion (#153) Prevent "Implicit conversion from float (number) to int loses precision" errors. --- www/request_account/human.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/request_account/human.php b/www/request_account/human.php index c0793ad..02556d7 100644 --- a/www/request_account/human.php +++ b/www/request_account/human.php @@ -66,7 +66,7 @@ for($i = 0; $i < $num_chars; $i++) { $txt_col = $textcols[rand(0,1)]; $txt_font = $fonts[array_rand($fonts)]; $txt = $human_proof[$i]; - imagettftext($image, $size, $angle, $txt_x, $txt_y, $txt_col, $txt_font, $txt); + imagettftext($image, $size, $angle, (int)$txt_x, (int)$txt_y, $txt_col, $txt_font, $txt); # print "imagettftext( $size, $angle, $txt_x, $txt_y, $txt_col, $txt_font, $txt);

"; }