diff --git a/module/bug/model.php b/module/bug/model.php index 1632c94d96..937a02c6e3 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -1207,9 +1207,9 @@ class bugModel extends model $this->dao->update(TABLE_BUG)->set('activatedCount = activatedCount + 1')->where('id')->eq((int)$bugID)->exec(); $openedBuilds = $this->post->openedBuild; - foreach($openedBuilds as $openedBuild) + if($openedBuilds) { - if(is_numeric($openedBuild)) $this->loadModel('build')->unlinkBug($openedBuild, $bugID); + foreach($openedBuilds as $openedBuild) $this->loadModel('build')->unlinkBug($openedBuild, $bugID); } $bug->activatedCount += 1;