From d8aa1c1ea39c98d77d3b667c495222c60fae1a44 Mon Sep 17 00:00:00 2001 From: wangchunsheng Date: Sun, 20 Jan 2013 10:06:16 +0000 Subject: [PATCH] * change the warnning error. --- module/bug/model.php | 5 +++++ module/testtask/control.php | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/module/bug/model.php b/module/bug/model.php index db23aaefc9..75beaa0706 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -539,9 +539,14 @@ class bugModel extends model $result = $this->dao->findById($resultID)->from(TABLE_TESTRESULT)->fetch(); if($caseID > 0) + { + $run = new stdclass(); $run->case = $this->loadModel('testcase')->getById($caseID, $result->version); + } else + { $run = $this->loadModel('testtask')->getRunById($result->run); + } if($result and $result->caseResult == 'fail') { $title = $run->case->title; diff --git a/module/testtask/control.php b/module/testtask/control.php index 83903ff5df..ee64c1fd89 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -517,7 +517,11 @@ class testtask extends control } if(!$caseID) $run = $this->testtask->getRunById($runID); - if($caseID) $run->case = $this->loadModel('testcase')->getById($caseID, $version); + if($caseID) + { + $run = new stdclass(); + $run->case = $this->loadModel('testcase')->getById($caseID, $version); + } $nextCase = ''; $caseID = $caseID ? $caseID : $run->case->id;