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

Created on 8 February 2022, over 2 years ago
Updated 13 April 2023, about 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.69.0 2024