From c369bda698fa1d4d7733bc1d8fc80e1ddf62d5d8 Mon Sep 17 00:00:00 2001 From: Bernard Date: Fri, 1 Nov 2024 10:24:41 +0000 Subject: [PATCH] Fix instance declaration for qrcode --- app/User.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/User.php b/app/User.php index ddcd1b7fa3..32901fd0b8 100644 --- a/app/User.php +++ b/app/User.php @@ -124,8 +124,8 @@ public function genQRcode(): array $google2fa = new Google2FA(); $qrinfo['secret'] = $google2fa->generateSecretKey(); $data = 'otpauth://totp/' . $this->user_id . '?secret=' . $qrinfo['secret'] . '&issuer=' . $_SERVER['SERVER_NAME']; - $qrinfo['qrcode'] = new QRCode(); - $qrinfo['qrcode'] = QRCode->render($data); + $qrcode = new QRCode(); + $qrinfo['qrcode'] = $qrcode->render($data); return $qrinfo; }