Skip to content

Commit

Permalink
Merge pull request #66 from tianheng2017/patch-1
Browse files Browse the repository at this point in the history
mt_rand小数在php8.1报错
  • Loading branch information
liu21st authored Mar 1, 2022
2 parents db5be36 + 80b4fc3 commit 7e4d99d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Captcha.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public function create(string $config = null, bool $api = false): Response

foreach ($text as $index => $char) {

$x = $this->fontSize * ($index + 1) * mt_rand(1.2, 1.6) * ($this->math ? 1 : 1.5);
$x = $this->fontSize * ($index + 1) * mt_rand(12, 16) / 10 * ($this->math ? 1 : 1.5);
$y = $this->fontSize + mt_rand(10, 20);
$angle = $this->math ? 0 : mt_rand(-40, 40);

Expand Down

1 comment on commit 7e4d99d

@ken678
Copy link

@ken678 ken678 commented on 7e4d99d Mar 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个更新后我的4位数验证码只能显示3个数字

Please sign in to comment.