From 442a5cf3858e95ece4bc9f8adf925ea9a77e4c6e Mon Sep 17 00:00:00 2001 From: zhaoke Date: Wed, 19 Jul 2023 11:39:11 +0800 Subject: [PATCH] * Fix notice of zanode. --- module/testtask/view/cases.html.php | 1 + module/zanode/control.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/module/testtask/view/cases.html.php b/module/testtask/view/cases.html.php index ba06e4105a..b8dbf9b595 100644 --- a/module/testtask/view/cases.html.php +++ b/module/testtask/view/cases.html.php @@ -18,6 +18,7 @@ + id : 0);?> app->loadLang('zanode');?> zanode->runCaseConfirm);?> diff --git a/module/zanode/control.php b/module/zanode/control.php index ad8a27397a..810e5759d7 100644 --- a/module/zanode/control.php +++ b/module/zanode/control.php @@ -618,7 +618,7 @@ class zanode extends control if($_POST) { $caseIDList = $_POST['caseIDList']; - $runIDList = $_POST['runIDList']; + $runIDList = empty($_POST['runIDList']) ? array() : $_POST['runIDList']; $script = $this->zanode->getAutomationByID($scriptID); $cases = $this->loadModel('testcase')->getByList($caseIDList); @@ -635,7 +635,7 @@ class zanode extends control $runIDListArray = explode(',', $runIDList); $case2RunMap = array(); - foreach($caseIDListArray as $index => $caseID) $case2RunMap[$caseID] = $runIDListArray[$index]; + foreach($caseIDListArray as $index => $caseID) $case2RunMap[$caseID] = empty($runIDListArray[$index]) ? 0 : $runIDListArray[$index]; foreach($cases as $id => $case) {