From 7fddab02aa9fbe32fac299f30dccfcf164be9908 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 8 Dec 2023 09:28:12 +0800 Subject: [PATCH] * Fix for export case. --- module/testcase/control.php | 2 +- module/testcase/model.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/testcase/control.php b/module/testcase/control.php index d8dcff4170..53d3c7f65e 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -977,7 +977,7 @@ class testcase extends control if($_POST) { $fields = $this->testcaseZen->getExportFields($product->type); - $cases = $this->testcase->getCasesToExport($this->post->exportType, $taskID, $orderBy, $this->post->limit); + $cases = $this->testcase->getCasesToExport($this->post->exportType, $taskID, $orderBy, (int)$this->post->limit); $cases = $this->testcaseZen->processCasesForExport($cases, $productID, $taskID); if($this->config->edition != 'open') list($fields, $cases) = $this->loadModel('workflowfield')->appendDataFromFlow($fields, $cases); diff --git a/module/testcase/model.php b/module/testcase/model.php index b3d8f93f47..fb32bb01c2 100644 --- a/module/testcase/model.php +++ b/module/testcase/model.php @@ -511,11 +511,11 @@ class testcaseModel extends model * @param string $exportType * @param int $taskID * @param string $orderBy - * @param int|bool $limit + * @param int $limit * @access public * @return array */ - public function getCasesToExport(string $exportType, int $taskID, string $orderBy, int|bool $limit): array + public function getCasesToExport(string $exportType, int $taskID, string $orderBy, int $limit): array { if(strpos($orderBy, 'case') !== false) {