function system_update_8802

Fix system.theme:admin when the default theme is used as the admin theme.

File

core/modules/system/system.install, line 2652

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);
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.