<?php

/**
 * @file
 * Post update functions for Cron Fail Alert.
 */

/**
 * Add langcode to cron_fail_alert.settings config.
 */
function cron_fail_alert_post_update_add_langcode(&$sandbox) {
  $config = \Drupal::configFactory()->getEditable('cron_fail_alert.settings');
  if (!$config->get('langcode')) {
    $langcode = \Drupal::languageManager()->getDefaultLanguage()->getId();
    $config->set('langcode', $langcode)->save();
  }
}
