From 21def75ef142ef49a04f180fa37cc7cf4328abe9 Mon Sep 17 00:00:00 2001 From: zhenhui <1276357500@qq.com> Date: Wed, 24 Jun 2026 16:36:30 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BC=98=E5=8C=96=E8=B0=B7=E6=AD=8C=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/library/AdminTotp.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/common/library/AdminTotp.php b/app/common/library/AdminTotp.php index dfcbc6c..bddd206 100644 --- a/app/common/library/AdminTotp.php +++ b/app/common/library/AdminTotp.php @@ -27,7 +27,8 @@ class AdminTotp if ($issuer === '') { $issuer = 'BuildAdmin'; } - self::$tfa = new TwoFactorAuth(new BaconQrCodeProvider(), $issuer); + // 使用 SVG 格式,避免依赖 imagick 扩展(PNG 默认需要 ImagickImageBackEnd) + self::$tfa = new TwoFactorAuth(new BaconQrCodeProvider(format: 'svg'), $issuer); } return self::$tfa; }