function system_post_update_mail_notification_setting

Adds default value for the mail_notification config parameter.

File

core/modules/system/system.post_update.php, line 208

Code

function system_post_update_mail_notification_setting() {
    $config = \Drupal::configFactory()->getEditable('system.site');
    // If the value doesn't exist it always returns NULL.
    if (is_null($config->get('mail_notification'))) {
        $config->set('mail_notification', NULL)
            ->save();
    }
}

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