diff --git a/module/bug/model.php b/module/bug/model.php index 64f52d5993..3b3bb73b99 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -797,14 +797,12 @@ class bugModel extends model foreach($bugs as $bug) { $openBuildIdList = explode(',', $bug->openedBuild); + $openedBuild = ''; - foreach($openBuildIdList as $buildID) - { - $openedBuild .= isset($builds[$buildID]) ? $builds[$buildID] : $buildID; - $openedBuild .= ','; - } + foreach($openBuildIdList as $buildID) $openedBuild .= zget($builds, $buildID) . ','; + $bug->openedBuild = rtrim($openedBuild, ','); - $bug->resolvedBuild = isset($builds[$bug->resolvedBuild]) ? $builds[$bug->resolvedBuild] : $bug->resolvedBuild; + $bug->resolvedBuild = zget($builds, $bug->resolvedBuild); } return $bugs; }