Fix incorrect background dynamic property in captcha library

This commit is contained in:
renothing 2023-06-05 11:01:12 +08:00 committed by GitHub
parent cbc76852f3
commit ad01710ce6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -427,7 +427,7 @@ class CaptchaBuilder implements CaptchaBuilderInterface
$color = $this->backgroundColor; $color = $this->backgroundColor;
$bg = imagecolorallocate($image, $color[0], $color[1], $color[2]); $bg = imagecolorallocate($image, $color[0], $color[1], $color[2]);
} }
$this->background = $bg; $this->backgroundColor = $bg;
imagefill($image, 0, 0, $bg); imagefill($image, 0, 0, $bg);
} else { } else {
// use a random background image // use a random background image