From 60a93a3d76035d9198e4f30f694aa641d67549b3 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Thu, 23 Nov 2023 08:57:56 +0800 Subject: [PATCH] * Fix bug #40850, modify parameter type after strict type declaration. --- module/testcase/control.php | 2 +- module/testcase/zen.php | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/module/testcase/control.php b/module/testcase/control.php index 87a5ff133f..01a8e229d1 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -99,7 +99,7 @@ class testcase extends control $suiteID = ($browseType == 'bysuite') ? $param : ($browseType == 'bymodule' ? ($this->cookie->caseSuite ? $this->cookie->caseSuite : 0) : 0); $queryID = ($browseType == 'bysearch') ? $param : 0; - $this->testcaseZen->setBrowseCookie((string)$productID, $branch, $browseType, (string)$param); + $this->testcaseZen->setBrowseCookie($productID, $branch, $browseType, (string)$param); $this->testcaseZen->setBrowseSession($productID, $moduleID, $browseType, $orderBy); $this->testcaseZen->setBrowseMenu($productID, $branch, $browseType, $projectID); $this->testcaseZen->buildBrowseSearchForm($productID, $branch, $queryID, $projectID); diff --git a/module/testcase/zen.php b/module/testcase/zen.php index 4f8c9e3b7e..0a7ffc53c5 100644 --- a/module/testcase/zen.php +++ b/module/testcase/zen.php @@ -22,7 +22,7 @@ class testcaseZen extends testcase * @access protected * @return void */ - protected function setBrowseCookie(string $productID, string $branch, string $browseType, string $param): void + protected function setBrowseCookie(int $productID, string|bool $branch, string $browseType, string $param): void { helper::setcookie('preProductID', $productID); helper::setcookie('preBranch', $branch); @@ -100,15 +100,14 @@ class testcaseZen extends testcase * 设置菜单。 * Set menu. * - * @param int $projectID - * @param int $executionID - * @param int $productID - * @param string $branch - * @param string $case + * @param int $projectID + * @param int $executionID + * @param int $productID + * @param string|int $branch * @access protected * @return void */ - protected function setMenu(int $projectID, int $executionID, int $productID, string $branch) + protected function setMenu(int $projectID, int $executionID, int $productID, string|int $branch) { if($this->app->tab == 'project') $this->loadModel('project')->setMenu($projectID); if($this->app->tab == 'execution') $this->loadModel('execution')->setMenu($executionID);