Deprecated function: unserialize(): Passing null to parameter #1 ($data) of type string is deprecated in video_embed_field_field_formatter_view()

Created on 15 March 2024, about 1 year ago
Updated 18 March 2024, about 1 year ago

Problem/Motivation

In the PHP 8.1 in specific cases we can have a deprecation error:

Deprecated function: unserialize(): Passing null to parameter #1 ($data) of type string is deprecated in video_embed_field_field_formatter_view()

Steps to reproduce

  1. Install D7 and module on PHP 8.1
  2. Create new Content Type (or use existing), Create and Add Video Field
  3. Try to create a content with "https://youtu.be/C0DPdy98e4c" URL
  4. Check logs

Proposed resolution

We need to add a check for existing data before the unserialize function.

πŸ› Bug report
Status

RTBC

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine tibezh

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

Production build 0.71.5 2024