MDL-76415 lib: Fixed ${var} str interpolation deprecations in php-jwt.

Since PHP 8.2, placing the dollar sign outside the curly brace is deprecated when
the expression inside the braces resolves to a variable or an expression.
This commit is contained in:
Meirza
2023-02-13 19:51:46 +07:00
parent 89131a73c2
commit 3f850a8a4a
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -13,3 +13,9 @@ Instructions
4. Download the latest release.
5. Unzip it in lib as php-jwt.
6. Update entry for this library in lib/thirdpartylibs.xml.
2023/01/26
----------
- src/JWT.php file has minor changes for PHP 8.2 compatibility. See MDL-76415 for more details.
Since version v6.3.1, the php-jwt already has the fix, so if someone executing the upgrading version and
it has the patch, please ignore this note.
+1 -1
View File
@@ -136,7 +136,7 @@ class JWT
// OpenSSL expects an ASN.1 DER sequence for ES256/ES384 signatures
$sig = self::signatureToDER($sig);
}
if (!self::verify("${headb64}.${bodyb64}", $sig, $key->getKeyMaterial(), $header->alg)) {
if (!self::verify("{$headb64}.{$bodyb64}", $sig, $key->getKeyMaterial(), $header->alg)) { // TODO: Remove this modification in MDL-76415.
throw new SignatureInvalidException('Signature verification failed');
}