Issue #3588930: Undefined array key "admin" warning in DomainThemeSwitchConfigForm::submitForm()
Summary
Closes #3588930.
DomainThemeSwitchConfigForm::submitForm() reads $system_theme_config['admin'] directly. The admin key on Drupal core's system.theme config is optional — it is only present when an admin theme has been explicitly configured. On sites that have never set an admin theme (older installations, custom install profiles, or manual YAML edits) the key is absent, and saving the form raises:
Warning: Undefined array key "admin" in DomainThemeSwitchConfigForm->submitForm() (line 207)The warning is non-fatal — $original_admin_theme resolves to NULL, the override is still saved — but the warning is logged on every submit.
Fix
Defensive ?? '' fallback on lines 206–207. Symmetric handling for both default and admin so the code does not encode an assumption about Drupal core's storage shape (default is always set today, but the matching guard keeps the two reads aligned).
Test
Added testSubmitFormWithoutAdminKeyOnSystemTheme to the existing DomainThemeSwitchFormTest class. It clears the admin key from the active system.theme config to simulate the no-admin-theme baseline, submits the configuration form, and asserts the override is written correctly. Without the fix, the functional test runner fails on the unhandled PHP warning.