Skip to content

Commit

Permalink
Fixes #14094: mc_issue_add project['name'] is not used
Browse files Browse the repository at this point in the history
Thanks to Tino Böhme (tino) for contributing a patch.
  • Loading branch information
vboctor committed Jun 2, 2012
1 parent ae8dbcb commit 0faacc3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions api/soap/mc_api.php
Expand Up @@ -86,10 +86,12 @@ function mci_has_administrator_access( $p_user_id, $p_project_id = ALL_PROJECTS
}

function mci_get_project_id( $p_project ) {
if( (int) $p_project['id'] != 0 ) {
if ( isset( $p_project['id'] ) && (int) $p_project['id'] != 0 ) {
$t_project_id = (int) $p_project['id'];
} else {
} else if ( isset( $p_project['name'] ) && !is_blank( $p_project['name'] ) ) {
$t_project_id = project_get_id_by_name( $p_project['name'] );
} else {
$t_project_id = ALL_PROJECTS;
}

return $t_project_id;
Expand Down

0 comments on commit 0faacc3

Please sign in to comment.