Skip to content

Commit a84b5b4

Browse files
committed
bugfix for linecolor
1 parent 00904e1 commit a84b5b4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Gregwar/Captcha/CaptchaBuilder.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,13 +270,13 @@ public function setBackgroundImages(array $backgroundImages)
270270
protected function drawLine($image, $width, $height, $tcol = null)
271271
{
272272
if ($this->lineColor === null) {
273-
$red = $this->lineColor[0];
274-
$green = $this->lineColor[1];
275-
$blue = $this->lineColor[2];
276-
} else {
277273
$red = $this->rand(100, 255);
278274
$green = $this->rand(100, 255);
279275
$blue = $this->rand(100, 255);
276+
} else {
277+
$red = $this->lineColor[0];
278+
$green = $this->lineColor[1];
279+
$blue = $this->lineColor[2];
280280
}
281281

282282
if ($tcol === null) {

0 commit comments

Comments
 (0)