mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Trim string to avoid leading whitespace if label is empty
This commit is contained in:
parent
81b8c111ca
commit
2b137d76fa
|
@ -155,10 +155,10 @@ class Label implements View
|
|||
|
||||
// The end result of this will be in this format:
|
||||
// {labelOne} {valueOne} | {labelTwo} {valueTwo} | {labelThree} {valueThree}
|
||||
$carry['value'] = implode(' | ', [
|
||||
$carry['value'] = trim(implode(' | ', [
|
||||
implode(' ', [$carry['label'], $carry['value']]),
|
||||
implode(' ', [$item['label'], $item['value']]),
|
||||
]);
|
||||
]));
|
||||
|
||||
// We'll set the label to an empty string since we
|
||||
// injected the label into the value field above.
|
||||
|
|
Loading…
Reference in a new issue