diff --git a/core/modules/system/lib/Drupal/system/Tests/Upgrade/MailUpgradePathTest.php b/core/modules/system/lib/Drupal/system/Tests/Upgrade/MailUpgradePathTest.php index d52fd22..dff78a4 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Upgrade/MailUpgradePathTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Upgrade/MailUpgradePathTest.php @@ -31,11 +31,11 @@ public function setUp() { * Tests that mail backends are upgraded to their Drupal 8 equivalents. */ function testMailSystemUpgrade() { - variable_set('mail_system', array( - 'default-system' => 'DefaultMailSystem', + $mail_interface_defaults = array( + 'default' => 'Drupal\Core\Mail\PhpMail', 'maillog' => 'MaillogMailSystem', - )); - + ); + config('system.mail')->set('interface', $mail_interface_defaults)->save(); // Perform the upgrade without redirecting to check for pending updates, // so that we can test for user warnings. $this->performUpgrade(TRUE, FALSE); diff --git a/core/modules/system/system.install b/core/modules/system/system.install index b701cbf..788465b 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -2236,8 +2236,10 @@ function system_update_8047() { unset($old_mail_system_settings[$key]); } } - // Warn about non-core classes which may need to be updated. - drupal_set_message(t('The following mail backends need to be re-configured: @list', array('@list' => implode(', ', $old_mail_system_settings))), 'warning'); + if (count($old_mail_system_settings)) { + // Warn about non-core classes which may need to be updated. + drupal_set_message(t('The following mail backends need to be re-configured: @list', array('@list' => implode(', ', $old_mail_system_settings))), 'warning'); + } $new_mail_system_settings += $old_mail_system_settings; // Save the updated variable, and let update_variables_to_config convert it.