Skip to content

Commit 6a6d7e5

Browse files
authoredFeb 14, 2025··
Merge pull request #10 from gaiustemple/bug/update-deprecated-utf8-function
Updated deprecated utf8_encode to mb_convert_encoding
2 parents 722343b + e3d16a3 commit 6a6d7e5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎src/Actions/FindPasskeyToAuthenticateAction.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ protected function findPasskey(PublicKeyCredential $publicKeyCredential): ?Passk
7171
{
7272
$passkeyModel = Config::getPassKeyModel();
7373

74-
return $passkeyModel::firstWhere('credential_id', utf8_encode($publicKeyCredential->rawId));
74+
return $passkeyModel::firstWhere('credential_id', mb_convert_encoding($publicKeyCredential->rawId, 'UTF-8'));
7575
}
7676

7777
protected function determinePublicKeyCredentialSource(

‎src/Models/Passkey.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function data(): Attribute
3535
PublicKeyCredentialSource::class
3636
),
3737
set: fn (PublicKeyCredentialSource $value) => [
38-
'credential_id' => utf8_encode($value->publicKeyCredentialId),
38+
'credential_id' => mb_convert_encoding($value->publicKeyCredentialId, 'UTF-8'),
3939
'data' => $serializer->toJson($value),
4040
],
4141
);

0 commit comments

Comments
 (0)
Please sign in to comment.