Trying to access array offset on value of type null in Drupal\campaignmonitor\Form\CampaignMonitorListSettingsForm->buildForm()

Created on 28 June 2022, almost 3 years ago
Updated 28 April 2023, almost 2 years ago

Problem/Motivation

When editing a list, I get the error Trying to access array offset on value of type null in Drupal\campaignmonitor\Form\CampaignMonitorListSettingsForm->buildForm(). Looking at the code, seems that's because I don't have a default weight set for the fields.

Proposed resolution

Add a null coalescing operator to set a default weight if the default value is not set.

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇨🇦Canada bbombachini London, ON

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