Passing null to parameter #1 ($data) of type string to unserialize() is deprecated

Created on 5 April 2022, over 2 years ago
Updated 24 May 2024, 7 months ago

Problem/Motivation

Right after I upgraded PHP to version 8.1.4 following error appears :

Deprecated function: unserialize(): Passing null to parameter #1 ($data) of type string is deprecated in Drupal\viewsreference\Plugin\Field\FieldFormatter\ViewsReferenceFieldFormatter->viewElements() (line 75 of modules/viewsreference/src/Plugin/Field/FieldFormatter/ViewsReferenceFieldFormatter.php).

attached Patch, please try to test if it works for you.

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΈπŸ‡°Slovakia coaston

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