Verified Commit 4f633dcc authored by Dave Long's avatar Dave Long
Browse files

Issue #3342489 by _shY, smustgrave, longwave, Wim Leers: Add default value for...

Issue #3342489 by _shY, smustgrave, longwave, Wim Leers: Add default value for mail_notification in site.system config
parent fd361543
Loading
Loading
Loading
Loading
Loading
+1 −0
Changes for core/modules/system/config/install/system.site.yml: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -10,3 +10,4 @@ page:
admin_compact_mode: false
weight_select_max: 100
default_langcode: en
mail_notification: null
+11 −0
Changes for core/modules/system/system.post_update.php: 11 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -201,3 +201,14 @@ function system_post_update_amend_config_sync_readme_url() {
  file_put_contents($readme_path, $changed_content);
  return \t('Amended configuration synchronization readme file content.');
}

/**
 * Adds default value for the mail_notification config parameter.
 */
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();
  }
}
+1 −0
Changes for core/modules/system/tests/src/Kernel/Migrate/d6/MigrateSystemConfigurationTest.php: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -109,6 +109,7 @@ class MigrateSystemConfigurationTest extends MigrateDrupal6TestBase {
      'admin_compact_mode' => FALSE,
      'weight_select_max' => 100,
      'default_langcode' => 'en',
      'mail_notification' => NULL,
    ],
  ];

+1 −0
Changes for core/modules/system/tests/src/Kernel/Migrate/d7/MigrateSystemConfigurationTest.php: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -118,6 +118,7 @@ class MigrateSystemConfigurationTest extends MigrateDrupal7TestBase {
      'admin_compact_mode' => TRUE,
      'weight_select_max' => 100,
      'default_langcode' => 'en',
      'mail_notification' => NULL,
    ],
  ];

+1 −0
Changes for core/profiles/demo_umami/config/install/system.site.yml: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -10,3 +10,4 @@ page:
admin_compact_mode: false
weight_select_max: 100
default_langcode: en
mail_notification: null
Loading