DomainThemeSwitchConfigForm error messages

Created on 14 October 2025, 3 days ago

Problem/Motivation

1. After activating the module, there are several error messages on the configure page:

Error message
Warning: Trying to access array offset on false in Drupal\domain_theme_switch\Form\DomainThemeSwitchConfigForm->buildForm() (line 146 of modules/contrib/domain_theme_switch/src/Form/DomainThemeSwitchConfigForm.php).
Error message
Warning: Trying to access array offset on false in Drupal\domain_theme_switch\Form\DomainThemeSwitchConfigForm->buildForm() (line 147 of modules/contrib/domain_theme_switch/src/Form/DomainThemeSwitchConfigForm.php).
Error message
Warning: Undefined array key "admin" in Drupal\domain_theme_switch\Form\DomainThemeSwitchConfigForm->buildForm() (line 147 of modules/contrib/domain_theme_switch/src/Form/DomainThemeSwitchConfigForm.php).
Error message
Warning: Trying to access array offset on false in Drupal\domain_theme_switch\Form\DomainThemeSwitchConfigForm->buildForm() (line 146 of modules/contrib/domain_theme_switch/src/Form/DomainThemeSwitchConfigForm.php).
Error message
Warning: Trying to access array offset on false in Drupal\domain_theme_switch\Form\DomainThemeSwitchConfigForm->buildForm() (line 147 of modules/contrib/domain_theme_switch/src/Form/DomainThemeSwitchConfigForm.php).

2. Additionally after enabling the theme override, there are other errmor messages:

Error message
Warning: Trying to access array offset on false in Drupal\domain_theme_switch\Form\DomainThemeSwitchConfigForm->submitForm() (line 235 of modules/contrib/domain_theme_switch/src/Form/DomainThemeSwitchConfigForm.php).
Error message
Warning: Trying to access array offset on false in Drupal\domain_theme_switch\Form\DomainThemeSwitchConfigForm->submitForm() (line 236 of modules/contrib/domain_theme_switch/src/Form/DomainThemeSwitchConfigForm.php).
Error message
Deprecated function: Automatic conversion of false to array is deprecated in Drupal\domain_theme_switch\Form\DomainThemeSwitchConfigForm->submitForm() (line 247 of modules/contrib/domain_theme_switch/src/Form/DomainThemeSwitchConfigForm.php).

Steps to reproduce

1. Install the module composer require 'drupal/domain_theme_switch:^3.0@alpha'
2. Active it
3. Go to the "Configure" page while having active domain records

---

3a. Enable a theme override and more errors will appear.

🐛 Bug report
Status

Needs review

Version

3.0

Component

Code

Created by

🇩🇪Germany drupalgarm

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.

No activities found.

Production build 0.71.5 2024