Key Multivalue Key Type: JSON decode accepts NULL, triggers PHP 8.1 deprecation

Created on 6 October 2025, about 6 hours ago

Drupal\Component\Serialization\Json::decode() is invoked with NULL inside AuthenticationMultivalueKeyType.php::unserialize(). Under PHP 8.1 this raises Deprecated: json_decode(): Passing null to parameter #1 ($json) of type string is deprecated.

Steps to reproduce

  • Enable a multivalue key type (e.g. Turnstile or another module that stores multiple credentials).
  • Leave one of the configured key fields empty or remove the stored value so that the key entity’s value becomes NULL/empty.
  • Load a page that reads the key (e.g. a CAPTCHA render).

Will provide a MR

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

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