Skip to content

Commit 84c3d77

Browse files
author
Joseph Shanak
committed
Handle missing translations when saving.
Fixes #15272
1 parent 566f715 commit 84c3d77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Behavior/Translate/TranslateStrategyTrait.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ protected function unsetEmptyFields($entity)
111111
foreach ($translations as $locale => $translation) {
112112
$fields = $translation->extract($this->_config['fields'], false);
113113
foreach ($fields as $field => $value) {
114-
if (strlen($value) === 0) {
114+
if ($value === null || strlen($value) === 0) {
115115
$translation->unset($field);
116116
}
117117
}

0 commit comments

Comments
 (0)