Deprecated Function: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\key\Plugin\KeyType\EncryptionKeyType->validateKeyValue() (line 124 of modules/contrib/key/src/Plugin/KeyType/EncryptionKeyType.php)

Created on 22 November 2022, almost 2 years ago
Updated 15 July 2024, 4 months ago

Problem/Motivation

Getting the following error message when trying to save a key with a wrong path

Deprecated Function: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\key\Plugin\KeyType\EncryptionKeyType->validateKeyValue() (line 124 of modules/contrib/key/src/Plugin/KeyType/EncryptionKeyType.php)

Steps to reproduce

  • Install encrypt module
  • Install keys module
  • Goto "/config/system/keys/add"
  • Enter key name, description, select key type as encryption, size as 256, key provider as file and enter a path which doesn't contain a key file

Proposed resolution

Implement attached patch

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇨🇦Canada WebKings.ca London (Canada)

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024