From a450602932a5d9ba183e288b79921ba3b9a92331 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sat, 23 Apr 2022 10:38:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=E5=85=BC=E5=AE=B9=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Captcha.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Captcha.php b/src/Captcha.php index 8a0ce49..e3fa5ef 100644 --- a/src/Captcha.php +++ b/src/Captcha.php @@ -224,7 +224,7 @@ public function create(string $config = null, bool $api = false): Response $y = $this->fontSize + mt_rand(10, 20); $angle = $this->math ? 0 : mt_rand(-40, 40); - imagettftext($this->im, $this->fontSize, $angle, $x, $y, $this->color, $fontttf, $char); + imagettftext($this->im, $this->fontSize, $angle, (int) $x, (int) $y, $this->color, $fontttf, $char); } ob_start();