diff --git a/module/bug/control.php b/module/bug/control.php index c424c04763..cb9bad9a16 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -985,6 +985,7 @@ class bug extends control parse_str($kanbanInfo, $kanbanParams); $bugData = $this->bugZen->buildBugForActivate($bugID); + if(!$bugData) return $this->send(array('result' => 'fail', 'message' => $this->lang->bug->error->notExist)); $this->bug->activate($bugData, $kanbanParams); if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError())); diff --git a/module/bug/model.php b/module/bug/model.php index e04cff7658..06ac633a53 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -1040,7 +1040,11 @@ class bugModel extends model { $bugID = (int)$bug->id; $oldBug = $this->getBaseInfo($bugID); - if(!$oldBug) return false; + if(!$oldBug) + { + dao::$errors[] = $this->lang->bug->error->notExist; + return false; + } if($oldBug->status != 'resolved' && $oldBug->status != 'closed') { dao::$errors[] = $this->lang->bug->error->cannotActivate;