Skip to content

Commit

Permalink
Fix issue with null $alg in constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvinmo committed Jul 6, 2024
1 parent 5460000 commit 3ba4baa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SimpleJWT/Crypt/KeyManagement/AESGCMKeyWrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class AESGCMKeyWrap extends BaseAlgorithm implements KeyEncryptionAlgorithm {
private $aesgcm;

public function __construct(?string $alg) {
$this->aesgcm = new AESGCM(substr($alg, 0, -2));
$this->aesgcm = new AESGCM(($alg == null) ? null : substr($alg, 0, -2));
parent::__construct($alg);
}

Expand Down

0 comments on commit 3ba4baa

Please sign in to comment.