[PHP8.1] Deprecated function: unserialize(): Passing null to parameter #1 ($data) of type string is deprecated

Created on 24 January 2022, almost 3 years ago
Updated 8 May 2023, over 1 year ago

Problem/Motivation

When Drupal is running on PHP8.1, two deprecation notices occur:

Deprecated function: unserialize(): Passing null to parameter #1 ($data) of type string is deprecated in Drupal\hide_revision_field\Plugin\Field\FieldWidget\RevisionLogWidget->formElement() (line 199 of modules/contrib/hide_revision_field/src/Plugin/Field/FieldWidget/RevisionLogWidget.php).

and

Deprecated function: unserialize(): Passing null to parameter #1 ($data) of type string is deprecated in hide_revision_field_form_user_form_alter() (line 43 of modules/contrib/hide_revision_field/hide_revision_field.module).

Proposed resolution

Fix the deprecations on PHP8.1

Remaining tasks

  1. Write a patch
  2. Review
  3. Commit

User interface changes

None.

API changes

None.

Data model changes

None.

📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇳🇱Netherlands idebr

Live updates comments and jobs are added and updated live.
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