webman-admin自带的Gregwar/Captcha验证码组件在php8.1环境下会抛异常

coding

PHP 版本8.1
Implicit conversion from float 25.5 to int loses precision in /wwwroot/tool/webman/vendor/gregwar/captcha/src/Gregwar/Captcha/CaptchaBuilder.php:365

截图
截图

1300 3 0
3个回答

coding

@walkor

ersic

自己fork一个版本,发个包,我就是这么搞的。你也可以直接用这个,但是不做任何保证。
https://github.com/ljnchn/Captcha

walkor

官方fork了一个版本,用这个吧
文档 https://www.workerman.net/doc/webman/components/captcha.html

composer require webman/captcha
  • ersic 2022-09-29

    👍

  • talentstone 2022-09-29

    webman/admin 已经更新了吗

  • walkor 2022-09-29

    更新了

  • realme 2023-03-30

    需要更改 /webman/plugin/admin/app/controller/common/AccountController.php

    use Gregwar\Captcha\CaptchaBuilder;

    use Webman\Captcha\CaptchaBuilder;

年代过于久远,无法发表回答
🔝