Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

请教一下后台登陆验证码报错

Open
#6 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
php

Research direction

Start with plugin/admin/app/controller/common/AccountController.php around the captcha endpoint, then inspect the reported failure at vendor/gregwar/captcha/src/Gregwar/Captcha/CaptchaBuilder.php:365 under PHP 8.1.7. Reproduce the backend login captcha request with the reported versions; done means the captcha is generated and displayed without the precision error.

Written by the indexing model from the issue text.

Description

安装了一下webman admin的后台 但是验证码 接口报错了一直显示不出来
我的环境 php8.1.7 workman 4.1.3 admin 0.3.1

微信截图_20220925180012
ErrorException: Implicit conversion from float 21.5 to int loses precision in /home/meng/work/graduate/vendor/gregwar/captcha/src/Gregwar/Captcha/CaptchaBuilder.php:365
Stack trace:
#0 [internal function]: support\App::{closure}()
#1 /home/meng/work/graduate/vendor/gregwar/captcha/src/Gregwar/Captcha/CaptchaBuilder.php(365): imagettftext()
#2 /home/meng/work/graduate/vendor/gregwar/captcha/src/Gregwar/Captcha/CaptchaBuilder.php(459): Gregwar\Captcha\CaptchaBuilder->writePhrase()
#3 /home/meng/work/graduate/plugin/admin/app/controller/common/AccountController.php(127): Gregwar\Captcha\CaptchaBuilder->build()
#4 /home/meng/work/graduate/vendor/workerman/webman-framework/src/App.php(304): plugin\admin\app\controller\common\AccountController->captcha()
#5 /home/meng/work/graduate/plugin/admin/app/middleware/AccessControl.php(21): Webman\App::Webman\{closure}()
#6 /home/meng/work/graduate/vendor/workerman/webman-framework/src/App.php(299): plugin\admin\app\middleware\AccessControl->process()
#7 /home/meng/work/graduate/vendor/workerman/webman-framework/src/App.php(122): Webman\App::Webman\{closure}()
#8 /home/meng/work/graduate/vendor/workerman/workerman/Connection/TcpConnection.php(638): Webman\App->onMessage()
#9 /home/meng/work/graduate/vendor/workerman/workerman/Events/Select.php(311): Workerman\Connection\TcpConnection->baseRead()
#10 /home/meng/work/graduate/vendor/workerman/workerman/Worker.php(2457): Workerman\Events\Select->loop()
#11 /home/meng/work/graduate/vendor/workerman/workerman/Worker.php(1568): Workerman\Worker->run()
#12 /home/meng/work/graduate/vendor/workerman/workerman/Worker.php(1410): Workerman\Worker::forkOneWorkerForLinux()
#13 /home/meng/work/graduate/vendor/workerman/workerman/Worker.php(1384): Workerman\Worker::forkWorkersForLinux()
#14 /home/meng/work/graduate/vendor/workerman/workerman/Worker.php(559): Workerman\Worker::forkWorkers()
#15 /home/meng/work/graduate/vendor/workerman/webman-framework/src/support/App.php(124): Workerman\Worker::runAll()
#16 /home/meng/work/graduate/start.php(4): support\App::run()
#17 {main}
Dominant language
JavaScript
Stars
378
Forks
48
Avg merge
20h 9m
Merged PRs (30d)
2

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from webman-php/admin

All issues in webman-php/admin

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.