Handle unset keys in \Drupal\role_theme_switcher\Theme\RoleThemeSwitcherNegotiator::applies

Created on 16 January 2024, 10 months ago

Problem/Motivation

The config entity is not always complete, i.e. if a new role gets created and a config script e.g. sets something like drush -y config:set role_theme_switcher.settings roles.newrole.theme gin, then the admin_theme key is missing in that case. That creates warnings on screen and in the log.

Proposed resolution

Use a default, if a value is not defined.

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇩🇪Germany jurgenhaas Gottmadingen

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024