D9 - Warning : Illegal string offset 'active' / 'list'

Created on 8 February 2022, almost 3 years ago
Updated 13 April 2023, over 1 year ago

Problem/Motivation

Drupal 9 fresh install, on /admin/config/system/sendinblue page :

Warning : Illegal string offset 'active' dans Drupal\sendinblue\Form\RegisteringUserForm->buildForm() (modules/contrib/sendinblue/src/Form/RegisteringUserForm.php line 86)
Warning : Illegal string offset 'list' in Drupal\sendinblue\Form\RegisteringUserForm->buildForm() (modules/contrib/sendinblue/src/Form/RegisteringUserForm.php line 97)

Proposed resolution

    $settings_registering_user = $this->configFactory()->get(SendinblueManager::CONFIG_SETTINGS_REGISTERING_USER)->get('sendinblue_put_registered_user');

    $form['sendinblue_put_registered_user']['active'] = [
    ...
      '#default_value' => isset($settings_registering_user['active']) ? $settings_registering_user['active'] : NULL,
    ...
    ];

    $form['sendinblue_put_registered_user']['list'] = [
    ...
      '#default_value' => isset($settings_registering_user['list']) ? $settings_registering_user['list'] : NULL,
    ...
    ];
🐛 Bug report
Status

RTBC

Version

2.0

Component

Code

Created by

🇫🇷France slayne40

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