PHP 8.1 Compatibility Fix

Created on 5 May 2023, over 1 year ago
Updated 2 February 2024, 10 months ago

Problem/Motivation

On PHP 8.1 the module will not work properly due to this error:
Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in modules\contrib\commerce_order_data_formatter\src\Plugin\Field\FieldFormatter\CommerceOrderDataFormatter.php on line 80

Proposed resolution

Fix the issue by changing line 80:

$value = explode(',', $this->getSetting('keys') ?? '');

🐛 Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

🇺🇸United States sleewok

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024