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.

CommentFileSizeAuthor
#3 3356064-coupon-unserialize.patch657 bytesklausi

Comments

klausi created an issue. See original summary.

klausi’s picture

Project: Commerce Discount » Commerce Coupon (D7)
klausi’s picture

Status: Active » Needs review
StatusFileSize
new657 bytes

Patch.

tibezh’s picture

Status: Needs review » Reviewed & tested by the community

Looks good, thank you @klausi!

damienmckenna’s picture

+1 for the fix, thanks Klausi.