Undefined array key "weight" commerce_flat_rate.module

Created on 14 January 2023, over 2 years ago
Updated 28 January 2023, about 2 years ago

Problem/Motivation

Not sure if this is a PHP 8.0 thing or what caused it, but flat rate definitions do not always have a "weight" value, so the following warning gets thrown:

Undefined array key "weight" commerce_flat_rate.module:202

Proposed resolution

If the "weight" element isn't defined in the $service, default to 0.

Remaining tasks

User interface changes

n/a

API changes

n/a

Data model changes

n/a

πŸ› Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

Live updates comments and jobs are added and updated live.
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