我在用TestLink做测试用例执行时,报出如下错误:

Fatal error: Uncaught Error: Cannot use string offset as an array in C:\testlink\htdocs\testlink\lib\execute\execSetResults.php:1539Stack trace:#0 C:\testlink\htdocs\testlink\lib\execute\execSetResults.php(94): processTestCase(NULL, Object(stdClass), Object(stdClass), Object(stdClass), Array, Object(tree), Object(testcase), Object(tlAttachmentRepository))#1 {main} thrown in C:\testlink\htdocs\testlink\lib\execute\execSetResults.php on line 1539

解决办法:

修改C:\testlink\htdocs\testlink\lib\execute\execSetResults.php配置文件

将该文件中内容修改:

待修改地方:

foreach($locationFilters as $locationKey => $filterValue){    
    $finalFilters=$cf_filters+$filterValue;
    $guiObj->design_time_cfields[$tcase_id][$locationKey] = 

见如上所示修改为:

foreach($locationFilters as $locationKey => $filterValue){
    $finalFilters = array();
    $guiObj->design_time_cfields = array();

修改结果如下:

Logo

技术共进,成长同行——讯飞AI开发者社区

更多推荐