Skip to content

Commit

Permalink
Fix substr(null) in constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvinmo committed Mar 29, 2024
1 parent 5460000 commit c47bf01
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 c47bf01

Please sign in to comment.