function system_update_8802 in Drupal 8
Fix system.theme:admin when the default theme is used as the admin theme.
File
- core/
modules/ system/ system.install, line 2652 - Install, update and uninstall functions for the system module.
Code
function system_update_8802() {
$config = Drupal::configFactory()
->getEditable('system.theme');
// Replace '0' with an empty string as '0' is not a valid value.
if ($config
->get('admin') == '0') {
$config
->set('admin', '')
->save(TRUE);
}
}