From 8dacfa76067345a6d946a0db4ee67cea4dbddca5 Mon Sep 17 00:00:00 2001 From: liugang Date: Wed, 13 Sep 2023 10:37:51 +0800 Subject: [PATCH] * testtaskModel: return false if the $taskID parameter is empty. --- module/testtask/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/testtask/model.php b/module/testtask/model.php index 8bd0da9067..918215e9c7 100755 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -973,7 +973,7 @@ class testtaskModel extends model */ public function batchUnlinkCases(int $taskID, array $caseIdList): bool { - if(!$caseIdList) return false; + if(!$taskID || !$caseIdList) return false; $cases = $this->dao->select('`case`')->from(TABLE_TESTRUN)->where('task')->eq($taskID)->andWhere('`case`')->in($caseIdList)->fetchPairs(); if(!$cases) return false;