Skip to content

A free open source IT asset/license management system

Trim string to avoid leading whitespace if label is empty

Marcus Moore2b137d76fa7e
diff --git a/app/View/Label.php b/app/View/Label.php
index f43263aefa..b1b121bd4e 100644
--- a/app/View/Label.php
+++ b/app/View/Label.php
@@ -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.