* fix a bug.
This commit is contained in:
@@ -220,20 +220,20 @@ class bug extends control
|
||||
$response['message'] = '';
|
||||
|
||||
$bugResult = $this->bug->create();
|
||||
$bugID = $bugResult['id'];
|
||||
if($bugResult['status'] == 'existed')
|
||||
{
|
||||
$response['locate'] = $this->createLink('bug', 'view', "bugID=$bugID");
|
||||
$this->send($response);
|
||||
}
|
||||
|
||||
if(dao::isError())
|
||||
if(!$bugResult or dao::isError())
|
||||
{
|
||||
$response['result'] = 'fail';
|
||||
$response['message'] = dao::getError();
|
||||
$this->send($response);
|
||||
}
|
||||
|
||||
$bugID = $bugResult['id'];
|
||||
if($bugResult['status'] == 'existed')
|
||||
{
|
||||
$response['locate'] = $this->createLink('bug', 'view', "bugID=$bugID");
|
||||
$this->send($response);
|
||||
}
|
||||
|
||||
$actionID = $this->action->create('bug', $bugID, 'Opened');
|
||||
$this->sendmail($bugID, $actionID);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user