Dont concat if one of the strings is empty during part merge

This commit is contained in:
Jan Böhmer 2023-11-24 23:16:26 +01:00
parent 36879dd7da
commit b9956e38b8
2 changed files with 29 additions and 0 deletions

View file

@ -319,6 +319,14 @@ trait EntityMergerHelperTrait
return $t;
}
//Skip empty strings
if (trim($t) === '') {
return trim($o);
}
if (trim($o) === '') {
return trim($t);
}
return trim($t) . $separator . trim($o);
},
$target,
@ -344,6 +352,14 @@ trait EntityMergerHelperTrait
return $t;
}
//Skip empty strings
if (trim($t) === '') {
return trim($o);
}
if (trim($o) === '') {
return trim($t);
}
return sprintf("%s\n\n<b>%s:</b>\n%s",
trim($t),
$other->getName(),