From db5be361d3cd664d236fb95d5dffe93a117283ad Mon Sep 17 00:00:00 2001 From: ThinkPHP Date: Fri, 7 Jan 2022 14:34:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=85=BC=E5=AE=B9=E6=80=A7?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= 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 0789087..83195f1 100644 --- a/src/Captcha.php +++ b/src/Captcha.php @@ -178,7 +178,7 @@ public function create(string $config = null, bool $api = false): Response // 图片高(px) $this->imageH || $this->imageH = $this->fontSize * 2.5; // 建立一幅 $this->imageW x $this->imageH 的图像 - $this->im = imagecreate($this->imageW, $this->imageH); + $this->im = imagecreate((int) $this->imageW, (int) $this->imageH); // 设置背景 imagecolorallocate($this->im, $this->bg[0], $this->bg[1], $this->bg[2]);