From 1c02bd9377b1e11d8457d5bd85d81eb79e25dea9 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Mon, 14 Sep 2020 10:04:31 +0800 Subject: [PATCH] * Fix bug #3457. --- module/bug/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/bug/model.php b/module/bug/model.php index 34265dc509..b8e875c015 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -1182,9 +1182,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;