Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated warning utf8_encode #36

Open
Leonetienne opened this issue Apr 7, 2024 · 1 comment
Open

Deprecated warning utf8_encode #36

Leonetienne opened this issue Apr 7, 2024 · 1 comment

Comments

@Leonetienne
Copy link

Using this code

            $otp = $_GET['otp'];

            $validator = new Validate(
                $secret,
                $id
            );

            try {
                $response = $validator->check($otp);
            }
            catch (\Exception) {
                die('Access denied!');
            }

            if ($response->success()) {
                die('Access granted!');
            }
            else {
                die('Access denied!');
            }

yields the following response

Deprecated: Function utf8_encode() is deprecated in /var/www/html/vendor/enygma/yubikey/src/Yubikey/Validate.php on line 257

Deprecated: Function utf8_encode() is deprecated in /var/www/html/vendor/enygma/yubikey/src/Yubikey/Validate.php on line 257
Access granted!

I am using PHP 8.2 and enygma/yubikey 3.6

@mbolli
Copy link
Contributor

mbolli commented May 8, 2024

This was merged in #33 but overwritten by #34, sorry about that.

@enygma This should be re-introduced to fix the E_DEPRECATED error:
https://github.com/enygma/yubikey/pull/33/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants