You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When saving translations, some of which have an empty value (null or empty string), only the last value is written to the database.
↪️ To Reproduce
Execute
$promotion->replaceTranslations('name', [
"uk" => "Діти від 10 до 15 років",
"ru" => "Дети от 10 до 15 лет",
"en" => "Children from 10 to 15 years old",
"pl" => "Podziewać od 10 do 15 lat",
"de" => null,
"cs" => null,
"fr" => null,
"es" => null,
"it" => null,
]);
$promotion->save();
Then execute
$promotion->getTranslations('name');
The result will be correct
But in the value saved in the database we see the following
$promotion->getOriginal('name');
✅ Expected behavior
[
"uk" => "Діти від 10 до 15 років",
"ru" => "Дети от 10 до 15 лет",
"en" => "Children from 10 to 15 years old",
"pl" => "Podziewać od 10 do 15 lat",
"de" => null,
"cs" => null,
"fr" => null,
"es" => null,
"it" => null,
]
or
[
"uk" => "Діти від 10 до 15 років",
"ru" => "Дети от 10 до 15 лет",
"en" => "Children from 10 to 15 years old",
"pl" => "Podziewać od 10 do 15 lat",
]
The text was updated successfully, but these errors were encountered:
✏️ Describe the bug
When saving translations, some of which have an empty value (
null
or empty string), only the last value is written to the database.↪️ To Reproduce
Execute
Then execute
The result will be correct
But in the value saved in the database we see the following
✅ Expected behavior
or
The text was updated successfully, but these errors were encountered: