测试单报错已解决 悬赏5积分
点测试单名称就提示如下报错:
Fatal error: /zentao/testtask-cases-5.html
Fatal error: Uncaught TypeError: testtaskModel::getTaskCases(): Argument #4 ($moduleID) must be of type int, string given, called in /opt/zbox/app/zentao/module/testtask/control.php on line 407 and defined in /opt/zbox/app/zentao/module/testtask/model.php:1057 Stack trace: #0 /opt/zbox/app/zentao/module/testtask/control.php(407): testtaskModel->getTaskCases(13, 'all', 0, '112', 'id_desc,t2.id_d...', Object(pager), Object(stdClass)) #1 /opt/zbox/app/zentao/framework/base/router.class.php(2451): testtask->cases(5, 'all', 0, 'id_desc', 0, 20, 1) #2 /opt/zbox/app/zentao/framework/router.class.php(743): baseRouter->loadModule() #3 /opt/zbox/app/zentao/www/index.php(77): router->loadModule() #4 {main} thrown in /opt/zbox/app/zentao/module/testtask/model.php on line 1057 20:46:38 Uncaught TypeError: testtaskModel::getTaskCases(): Argument #4 ($moduleID) must be of type int, string given, called in /opt/zbox/app/zentao/module/testtask/control.php on line 407 and defined in /opt/zbox/app/zentao/module/testtask/model.php:1057 Stack trace: #0 /opt/zbox/app/zentao/module/testtask/control.php(407): testtaskModel->getTaskCases(13, 'all', 0, '112', 'id_desc,t2.id_d...', Object(pager), Object(stdClass)) #1 /opt/zbox/app/zentao/framework/base/router.class.php(2451): testtask->cases(5, 'all', 0, 'id_desc', 0, 20, 1) #2 /opt/zbox/app/zentao/framework/router.class.php(743): baseRouter->loadModule() #3 /opt/zbox/app/zentao/www/index.php(77): router->loadModule() #4 {main} thrown in /opt/zbox/app/zentao/module/testtask/model.php on line 1057 when visiting testtask-cases-5 Fatal error: Uncaught EndResponseException in /opt/zbox/app/zentao/framework/base/router.class.php:3636 Stack trace: #0 /opt/zbox/app/zentao/framework/base/helper.class.php(1086): EndResponseException::create('') #1 /opt/zbox/app/zentao/framework/base/router.class.php(3285): baseHelper::end() #2 /opt/zbox/app/zentao/framework/router.class.php(380): baseRouter->saveError(1, 'Uncaught TypeEr...', '/opt/zbox/app/z...', 1057) #3 /opt/zbox/app/zentao/framework/base/router.class.php(3131): router->saveError(1, 'Uncaught TypeEr...', '/opt/zbox/app/z...', 1057) #4 [internal function]: baseRouter->shutdown() #5 {main} thrown in /opt/zbox/app/zentao/framework/base/router.class.php on line 3636
禅道版本:禅道开源版 20.0
安装包类型:Linux安装包
操作系统:
客户端浏览器:
于涛
2024-09-13 08:47:25
您好,关于20.0测试单点击报错的问题,这里有个TypeError,目前新版本已经处理,方便的时候可以做下升级就可以啦。 升级不会影响数据的,但建议先做好备份 升级前请做好数据备份
回复
|
🤖 你好,可以尝试在/opt/zbox/app/zentao/module/testtask/model.php文件中407行将 $moduleID = ($browseType 'bymodule') ? $param : ($browseType 'bysearch' ? 0 : ($this->cookie->taskCaseModule ?: 0)); 修改为 $moduleID = ($browseType 'bymodule') ? (int)$param : ($browseType 'bysearch' ? 0 : ($this->cookie->taskCaseModule ?: 0)); |