The deprecation message Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in jwt/src/Plugin/KeyType/JwtHsKeyType.php is thrown on PHP 8.1, when a new file key is added when the file doesn't exist

Steps to reproduce:

  • Navigate to /admin/config/system/keys/add to add a key
  • Set "Key type" to "JWT HMAC Key"
  • Set "Key provider" to "File"
  • Set "File location" to a non-existent file
  • Save the configuration

Comments

Arkener created an issue. See original summary.

arkener’s picture

Status: Active » Needs review
StatusFileSize
new904 bytes
pwolanin’s picture

Looks good, thanks - in a follow-up we should add a test, but I want to get the 1.0 out

pwolanin’s picture

Status: Needs review » Fixed

  • pwolanin committed d864d980 on 2.x
    Issue #3356017 by Arkener: fix for deprecation message on validation of...

  • pwolanin committed bcf1fb3f on 8.x-1.x
    Issue #3356017 by Arkener: fix for deprecation message on validation of...
pwolanin’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.