From 4bf0af5193fcd9688254a76fc8f28b968594c6dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=93=AD=E6=98=95?= <715557344@qq.com> Date: Fri, 25 Feb 2022 13:30:53 +0800 Subject: [PATCH] fix bug --- src/DragVerifier.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/DragVerifier.php b/src/DragVerifier.php index 6df84a3..cf736bc 100644 --- a/src/DragVerifier.php +++ b/src/DragVerifier.php @@ -32,10 +32,11 @@ public function __construct( ?int $color = null, ) { if ($hollowedImage === null) { - $this->hollowedImage = $this->createHollowedImage(); + $hollowedImage = $this->createHollowedImage(); } - $this->color = $color ?? imagecolorat($this->hollowedImage, 0, 0); + $this->hollowedImage = $hollowedImage; + $this->color = $color ?? imagecolorat($hollowedImage, 0, 0); } public function generate(): DragCode