* Resolved feedback #1279 ,testcase display error when import file have html char.

This commit is contained in:
孔令茂
2022-12-08 05:55:42 +00:00
parent 8a3d6c4dcd
commit 72eda68846
+3 -3
View File
@@ -1564,9 +1564,9 @@ class testcaseModel extends model
{
$caseID = $this->dao->lastInsertID();
$parentStepID = 0;
if($this->post->desc)
if($data->desc)
{
foreach($this->post->desc[$key] as $id => $desc)
foreach($data->desc[$key] as $id => $desc)
{
$desc = trim($desc);
if(empty($desc)) continue;
@@ -1576,7 +1576,7 @@ class testcaseModel extends model
$stepData->case = $caseID;
$stepData->version = 1;
$stepData->desc = htmlSpecialString($desc);
$stepData->expect = htmlSpecialString($this->post->expect[$key][$id]);
$stepData->expect = htmlSpecialString($data->expect[$key][$id]);
$this->dao->insert(TABLE_CASESTEP)->data($stepData)->autoCheck()->exec();
if($stepData->type == 'group') $parentStepID = $this->dao->lastInsertID();
if($stepData->type == 'step') $parentStepID = 0;