diff --git a/module/execution/control.php b/module/execution/control.php index e0441803e8..852ff8a755 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1312,7 +1312,7 @@ class execution extends control { $showBranch = true; $branchPairs = $branchGroups[$build->product]; - foreach(explode(',', $build->branch) as $branchID) $build->branchName .= "{$branchPairs[$branchID]},"; + foreach(explode(',', trim($build->branch, ',')) as $branchID) $build->branchName .= "{$branchPairs[$branchID]},"; $build->branchName = trim($build->branchName, ','); } } diff --git a/module/project/control.php b/module/project/control.php index e9bd7a942d..11669e7579 100755 --- a/module/project/control.php +++ b/module/project/control.php @@ -1466,7 +1466,7 @@ class project extends control { $showBranch = true; $branchPairs = $branchGroups[$build->product]; - foreach(explode(',', $build->branch) as $branchID) $build->branchName .= "{$branchPairs[$branchID]},"; + foreach(explode(',', trim($build->branch, ',')) as $branchID) $build->branchName .= "{$branchPairs[$branchID]},"; $build->branchName = trim($build->branchName, ','); } }