Skip to content

Commit

Permalink
Merge pull request #6 from jatyPeng/patch-1
Browse files Browse the repository at this point in the history
imagesetpixel需要传int类型参数,现在传的是浮点。代码会报错。
  • Loading branch information
kiss291323003 authored Sep 6, 2023
2 parents 804d3eb + e307765 commit cfd7c1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/VerifyCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ private function writeCurve(): void
$py = $A * sin($w * $px + $f) + $b + $this->conf->imageH / 2; // y = Asin(ωx+φ) + b
$i = (int)($this->conf->fontSize / 5);
while ($i > 0) {
imagesetpixel($this->imInstance, $px + $i, $py + $i, $this->conf->fontColor);
imagesetpixel($this->imInstance, intval($px + $i), intval($py + $i), $this->conf->fontColor);
$i--;
}
}
}
}
}
}

0 comments on commit cfd7c1a

Please sign in to comment.