Deprecated function: unserialize(): Passing null to parameter #1 ($data) of type string is deprecated in /CommerceCouponEntityController->attachLoad()

Created on 24 April 2023, over 1 year ago
Updated 10 February 2024, 10 months ago

Problem/Motivation

When upgrading to PHP 8.1 I get this warning during our test execution "Deprecated function/: unserialize(): Passing null to parameter #1 ($data) of type string is deprecated in /CommerceCouponEntityController->attachLoad()/ (line /79/ of
//var/www/html/profiles/recruiter/modules/commerce_coupon/includes/commerce_coupon.controller.inc/).

Proposed resolution

Just cast to string, we don't care about NULL values there.

πŸ› Bug report
Status

RTBC

Version

1.0

Component

Code

Created by

πŸ‡¦πŸ‡ΉAustria klausi πŸ‡¦πŸ‡Ή Vienna

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