diff --git a/code/app/Http/Controllers/GasController.php b/code/app/Http/Controllers/GasController.php index a5455f0e..cf571008 100644 --- a/code/app/Http/Controllers/GasController.php +++ b/code/app/Http/Controllers/GasController.php @@ -123,8 +123,8 @@ private function configMails($gas, $request) ]); foreach(array_keys(systemParameters('MailTypes')) as $identifier) { - if ($request->has("custom_mails_${identifier}_subject")) { - $gas->setConfig("mail_${identifier}", (object) [ + if ($request->has("custom_mails_" . $identifier . "_subject")) { + $gas->setConfig("mail_" . $identifier, (object) [ 'subject' => $request->input('custom_mails_' . $identifier . '_subject', ''), 'body' => $request->input('custom_mails_' . $identifier . '_body', ''), ]); diff --git a/code/app/Importers/CSV/CSVImporter.php b/code/app/Importers/CSV/CSVImporter.php index 393c680e..d5c99799 100644 --- a/code/app/Importers/CSV/CSVImporter.php +++ b/code/app/Importers/CSV/CSVImporter.php @@ -69,7 +69,7 @@ private function retrievePreSelectedFields($parameters) $fields = $this->fields(); foreach($parameters['columns'] as $index => $c) { - if (isset($sorted[$index])) { + if (isset($sorted[$index]) && isset($fields[$sorted[$index]])) { $selected[] = (object) [ 'label' => $fields[$sorted[$index]]->label, 'name' => $sorted[$index],