From 404e3df82907458081ddd829d123dd3522136d9f Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Wed, 5 Jun 2019 11:15:19 +0200 Subject: [PATCH] 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 #25856 (cherry picked from commit 5039c7b86a21f41a64c904e3eb16e0eb25ac2cb0) --- api/soap/mc_project_api.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/soap/mc_project_api.php b/api/soap/mc_project_api.php index 56b5125495..07d3ff209c 100644 --- a/api/soap/mc_project_api.php +++ b/api/soap/mc_project_api.php @@ -618,7 +618,8 @@ function mc_project_version_delete( $p_username, $p_password, $p_version_id ) { return mci_soap_fault_access_denied( $t_user_id ); } - return version_remove( $p_version_id ); + version_remove( $p_version_id ); + return true; } /**