Skip to content

Commit e85c2a9

Browse files
committed
Update Translatable.php
1 parent f5c1f63 commit e85c2a9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Eloquent/Traits/Translatable.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ protected static function bootTranslatable()
6969
if (is_array($original_locales)) {
7070
//Find and change only updated locales
7171
foreach ($updated_locales as $locale => $value) {
72-
$original_locales[$locale] = $value;
72+
if (strlen(strip_tags(trim($value))) != 0)
73+
$original_locales[$locale] = $value;
7374
}
7475
//remove empty translations from array and save as json
7576
$model->{$item} = json_encode(array_filter($original_locales, function($var) {

0 commit comments

Comments
 (0)