MantisBT - TestLink
View Issue Details
0008843TestLinkRequirement Managementpublic2020-01-12 08:202020-01-12 14:06
heju 
fman 
normalcrashalways
resolvedfixed 
 
1.9.20 
mysql
READY FOR TESTING
0008843: TL 1.9.20 (dev): PHP Fatal error: Uncaught Error on "Copy Requirements"
Dear fman,

trying to copy all requirements in one req spec to another spec, I noticed the page becomes white and the copy does not work.

In the apache log there is a php error:

PHP Fatal error: Uncaught Error: [] operator not supported for strings in /var/www/html/testlink/lib/requirements/reqSpecCommands.class.php:477

As a quick fix I replaced the $obj->array_of_msg init to array() instead of ''. This seems to fix the issue, opening a pull req to show the diff, maybe you can have a look, thank you!

No tags attached.
Issue History
2020-01-12 08:20hejuNew Issue
2020-01-12 08:37hejuNote Added: 0029406
2020-01-12 14:05fmanNote Added: 0029407
2020-01-12 14:06fmanQA Team - Task Workflow Status => READY FOR TESTING
2020-01-12 14:06fmanStatusnew => resolved
2020-01-12 14:06fmanFixed in Version => 1.9.20
2020-01-12 14:06fmanResolutionopen => fixed
2020-01-12 14:06fmanAssigned To => fman

Notes
(0029406)
heju   
2020-01-12 08:37   
Added pull req to show the issue location and a possible workaround:

https://github.com/TestLinkOpenSourceTRMS/testlink-code/pull/240 [^]

Note: There are more locations where array_of_msg is initialized to empty string, in this pull request I only changed the two locations after which the variable is accessed by [] to add another item, which causes the php exception.
(0029407)
fman   
2020-01-12 14:05   
thanks, issues probably are related to PHP version (7.4?)