MantisBT - TestLink
View Issue Details
0008660TestLinkAPI - XMLRPCpublic2019-05-09 20:142019-05-19 18:38
lczub 
fman 
normalminoralways
feedbackopen 
1.9.19 (2019 Q1) 
 
postgresql 9.6
0008660: API-XMLRPC - PHP Fatal error, when calling getTestCaseAttachments with unknown testcaseid
The TL 1.9.19 change on _xmlrpc.class.php_ method *getTestCaseAttachments* is not error safe

Calling *getTestCaseAttachments* with an unknown testcaseid returns
- with 1.9.18 the message *5000: The Test Case ID (testcaseid: 4711007) provided does not exist!*
- with 1.9.19 a *500 Internal Server Error*
httpd error.log
[Thu May 09 21:41:38.073512 2019] [:error] [pid 662] [client 2001:16b8:22cc:8500:f5b3:9e23:ef67:9643:53688] PHP Fatal error:\
  Cannot use object of type IXR_Error as array in /usr/local/www/testlink-1.9.19/lib/api/xmlrpc/v1/xmlrpc.class.php on line \
3627

Events - Warning
09/05/2019 21:41:42 E_NOTICE Use of undefined constant NO_USER_BY_ID_LOGIN - assumed 'NO_USER_BY_ID_LOGIN' - in /usr/local/www/testlink-1.9.19/lib/api/xmlrpc/v1/xmlrpc.class.php - Line 6134
09/05/2019 21:41:35 E_WARNING current() expects parameter 1 to be array, null given - in /usr/local/www/testlink-1.9.19/lib/api/xmlrpc/v1/xmlrpc.class.php - Line 284
No tags attached.
related to 0008658new  API-XMLRPC - getTestCaseAttachments returns no attachment, uploaded with uploadTestCaseAttachment 
Issue History
2019-05-09 20:14lczubNew Issue
2019-05-16 14:32fmanRelationship addedrelated to 0008658
2019-05-16 15:04fmanNote Added: 0028830
2019-05-16 19:34lczubNote Added: 0028831
2019-05-19 17:53fmanNote Added: 0028838
2019-05-19 18:38fmanNote Added: 0028839
2019-05-19 18:38fmanAssigned To => fman
2019-05-19 18:38fmanStatusnew => feedback

Notes
(0028830)
fman   
2019-05-16 15:04   
please try
https://github.com/TestLinkOpenSourceTRMS/testlink-code/commit/c9d82ef654b88bb43a25847303633a4e18386679 [^]
(0028831)
lczub   
2019-05-16 19:34   
retest 0008660 passed only partly
- Calling *getTestCaseAttachments* with an unknown testcaseid raise no internal server error any more

BUT
- Calling *getTestCase* with unknown 'testcaseexternalid' or 'testcaseexternalid' raise now an internal server error

retest 0008658 failed, workflow uploadTestCaseAttachment + getTestCaseAttachment without optional parameter *version* still does not work
(0028838)
fman   
2019-05-19 17:53   
getTestCase() fix
https://github.com/TestLinkOpenSourceTRMS/testlink-code/commit/c3322c0fcb885c8b8c14c12e123ea3ae7c520e02 [^]
(0028839)
fman   
2019-05-19 18:38   
https://github.com/TestLinkOpenSourceTRMS/testlink-code/commit/d32e464590787c77c9ca4b528bcd9a3eb4049ad4 [^]

uploadTestCaseAttachment()