Merge pull request #23509 from eileenmcnaughton/import_except
[civicrm-core.git] / CRM / Admin / Page / MailSettings.php
index c3dca8c85342c505c791ecfcda0eff51039243dc..28844d60782df6af6553fe40d79f9edcaa2eda8f 100644 (file)
@@ -105,7 +105,11 @@ class CRM_Admin_Page_MailSettings extends CRM_Core_Page_Basic {
         $mailSetting->id
       );
     }
-
+    $expectedKeys = ['server', 'username', 'localpart', 'domain', 'return_path', 'protocol', 'source', 'port', 'is_ssl'];
+    foreach ($allMailSettings as $key => $allMailSetting) {
+      // make sure they are there to prevent smarty notices.
+      $allMailSettings[$key] = array_merge(array_fill_keys($expectedKeys, NULL), $allMailSetting);
+    }
     $this->assign('rows', $allMailSettings);
 
     $setupActions = CRM_Core_BAO_MailSettings::getSetupActions();