View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0025470 | mantisbt | api soap | public | 2019-02-13 04:54 | 2019-08-25 12:36 |
Reporter | chadmiss | Assigned To | dregad | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.3.8 | ||||
Target Version | 2.22.0 | Fixed in Version | 2.22.0 | ||
Summary | 0025470: SOAP API return value does not match definition in WSDL | ||||
Description | on success the function mc_project_version_update() returns FALSE, i.e. the nonexistent return value of version_update() which is casted to NULL on several implementations. on an older version (1.2.19) version_update() returned true on success | ||||
Tags | No tags attached. | ||||
version_update() does not actually return anything (ie. @return void). This was indeed changed in MantisBT master a80f4476 (1.3.0-beta.1) prior to which it would indeed return true (and only true) in case of success - an error would be triggered otherwise, so no return value in this case. Using the return value in this case is incorrect, so mc_project_version_update() as well as any other function using version_update's return value should have been updated following the above-mentioned change. |
|
As mantis-axis-soap-client is just generating from the official wsdl you need to change the wsdl first: 0025838 |
|
IMO, instead of changing the WSDL, we should make sure that the API mc_project_version_update() returns the expected boolean type. Could you kindly confirm that the patch below fixes the problem |
|
+1 (maybe not only version_update but some other "return"s needs to be re-added to be wsdl conform again |
|
OK for version_remove(), I'll include the fix. The return values of the other 2 functions you mention are not used in SOAP API, AFAICT. If you notice any additional errors / discrepancies between code and WSDL, please open additional issues with relevant details. |
|
MantisBT: master a80f4476 2013-10-14 15:27 Paul Richards Details Diff |
Further backports of db_int*/phpdoc* |
Affected Issues 0017333, 0025470 |
|
mod - admin/install.php | Diff File | ||
mod - core/print_api.php | Diff File | ||
mod - core/profile_api.php | Diff File | ||
mod - core/project_hierarchy_api.php | Diff File | ||
mod - core/relationship_api.php | Diff File | ||
mod - core/string_api.php | Diff File | ||
mod - core/summary_api.php | Diff File | ||
mod - core/tag_api.php | Diff File | ||
mod - core/tokens_api.php | Diff File | ||
mod - core/user_api.php | Diff File | ||
mod - core/user_pref_api.php | Diff File | ||
mod - core/utility_api.php | Diff File | ||
mod - core/version_api.php | Diff File | ||
mod - core/wiki_api.php | Diff File | ||
MantisBT: master a309d0ab 2019-06-05 00:59 Details Diff |
Fix mc_project_version_update() return value The function's return type does not match the WSDL definition. This is a regression introduced by a80f447687722b52160d00c96c21a5be5f4329e1 which changed version_update()'s return type from true (bool) to void Since mc_project_version_update() actually returned that, it causes a side effect because void == NULL == false. To avoid an unnecessary and potentially breaking change in the WSDL, the function now returns true. Fixes 0025470 |
Affected Issues 0025470 |
|
mod - api/soap/mc_project_api.php | Diff File | ||
MantisBT: master 5039c7b8 2019-06-05 01:15 Details Diff |
Fix mc_project_version_delete() return value The function's return type does not match the WSDL definition. This is a regression introduced by a80f447687722b52160d00c96c21a5be5f4329e1 which changed version_delete()'s return type from true (bool) to void Since mc_project_version_delete() actually returned that, it causes a side effect because void == NULL == false. To avoid an unnecessary and potentially breaking change in the WSDL, the function now returns true. Fixes 0025470 |
Affected Issues 0025470 |
|
mod - api/soap/mc_project_api.php | Diff File |