From 24a640b6725cecf0c7fa4b1c9052bc94e9916a80 Mon Sep 17 00:00:00 2001 From: HHao Date: Tue, 27 Feb 2024 23:06:05 +0800 Subject: [PATCH] Fix implicit float to int conversion (#16) --- captcha-image.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/captcha-image.php b/captcha-image.php index 03bfc56..f33eba8 100644 --- a/captcha-image.php +++ b/captcha-image.php @@ -140,9 +140,9 @@ protected static function writeCurve() { while ($i > 0) { imagesetpixel( self::$image, - $px + $i, - $py + $i, - $color + (int)($px + $i), + (int)($py + $i), + (int)$color ); $i--; } @@ -162,9 +162,9 @@ protected static function writeCurve() { while ($i > 0) { imagesetpixel( self::$image, - $px + $i, - $py + $i, - $color + (int)($px + $i), + (int)($py + $i), + (int)$color ); $i--; }