Skip to content

Commit

Permalink
Fix mc_project_version_delete() return value
Browse files Browse the repository at this point in the history
The function's return type does not match the WSDL definition.

This is a regression introduced by a80f447
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 5039c7b)
  • Loading branch information
dregad committed Jun 11, 2019
1 parent 7b06ee3 commit 404e3df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/soap/mc_project_api.php
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit 404e3df

Please sign in to comment.