Commit db126e34 authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

[TASK] Prevent empty marker label

parent 7fe12b6f
......@@ -846,9 +846,10 @@ class MailTemplateService {
$allMarker = '';
foreach ($markers as $key => $value) {
if (\array_key_exists($key, $this->markerLabels)) {
if (\array_key_exists($key, $this->markerLabels) && $this->markerLabels[$key] !== NULL) {
$key = $this->markerLabels[$key];
}
if (\is_string($value)) {
$allMarker .= $key . ': ' . $value . PHP_EOL;
} elseif (\is_array($value)) {
......
......@@ -150,11 +150,7 @@ class FormEditorController extends \TYPO3\CMS\Form\Controller\FormEditorControll
$markerName = $markerArray[0];
}
$markerName = RegisterService::normalizeFormFieldMarkerName($markerName);
$markerLabel = $markerArray[0];
if (isset($markerArray[1])) {
$markerLabel = $markerArray[1];
}
$markerLabel = $markerArray[1] ?? $markerArray[0];
$markers[$markerName] = [
'identifier' => $markerName,
'type' => MailTemplateService::MARKER_TYPE_STRING,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment