json_decode(): Passing null to parameter #1 ($json) of type string is deprecated

Created on 22 May 2022, over 2 years ago
Updated 30 October 2023, about 1 year ago

Problem/Motivation

After enabling PHP 8.1 on Drupal 9.3.12 got these error messages in drupal logs: (Also about 10 other modules warned similarly)

Deprecated function: json_decode(): Passing null to parameter #1 ($json) of type string is deprecated in Drupal\h5peditor\H5PEditor\H5PEditorDrupalStorage->getLibraries() (line 130 of /var/www/html/test/web/modules/contrib/h5p/modules/h5peditor/src/H5PEditor/H5PEditorDrupalStorage.php)

Steps to reproduce

Enable PHP 8.1
Edit H5P interactive video and save it
See the logs

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇫🇮Finland jukka792

Live updates comments and jobs are added and updated live.
  • PHP 8.1

    The issue particularly affects sites running on PHP version 8.1.0 or later.

Sign in to follow issues

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