Skip to content
Snippets Groups Projects
Commit 331c534a authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

ensure that language values are never null, fixes #1711

Closes #1711

Merge request studip/studip!1449
parent 29c10064
No related branches found
No related tags found
1 merge request!4Draft: Icon creation
......@@ -16,7 +16,11 @@ class I18n_formattedInput extends Input
$value = $this->value;
} else {
$value = [\I18NString::getDefaultLanguage() => $this->value->original()];
$value = json_encode(array_merge($value, $this->value->toArray()));
$value = array_merge($value, $this->value->toArray());
$value = array_map(function ($item) {
return $item ?? '';
}, $value);
$value = json_encode($value);
}
$template = $GLOBALS['template_factory']->open('forms/i18n_formatted_input');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment