Skip to content

Commit 0faacc3

Browse files
committedJun 2, 2012
Fixes #14094: mc_issue_add project['name'] is not used
Thanks to Tino Böhme (tino) for contributing a patch.
1 parent ae8dbcb commit 0faacc3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎api/soap/mc_api.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,12 @@ function mci_has_administrator_access( $p_user_id, $p_project_id = ALL_PROJECTS
8686
}
8787

8888
function mci_get_project_id( $p_project ) {
89-
if( (int) $p_project['id'] != 0 ) {
89+
if ( isset( $p_project['id'] ) && (int) $p_project['id'] != 0 ) {
9090
$t_project_id = (int) $p_project['id'];
91-
} else {
91+
} else if ( isset( $p_project['name'] ) && !is_blank( $p_project['name'] ) ) {
9292
$t_project_id = project_get_id_by_name( $p_project['name'] );
93+
} else {
94+
$t_project_id = ALL_PROJECTS;
9395
}
9496

9597
return $t_project_id;

0 commit comments

Comments
 (0)