View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0011427 | mantisbt | api soap | public | 2010-01-22 13:37 | 2010-04-23 14:30 |
Reporter | rbendig | Assigned To | rombert | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.2.0rc2 | ||||
Target Version | 1.2.1 | Fixed in Version | 1.2.1 | ||
Summary | 0011427: Undefined index: id | ||||
Description | Hi, I am using the soap api of mantis in a .net 2 project. but i am unable to submit issues to mantis... i am getting the exception posted in Additional Information. id is defined, and even returned by the error... what's my mistake? | ||||
Additional Information | Error Type: SYSTEM NOTICE, | ||||
Tags | patch | ||||
Attached Files | soap_user_get_id.patch (644 bytes)
diff --git a/api/soap/mc_api.php b/api/soap/mc_api.php index 3c683e3..bcd8cc4 100644 --- a/api/soap/mc_api.php +++ b/api/soap/mc_api.php @@ -101,12 +101,10 @@ function mci_get_project_view_state_id( $p_view_state ) { function mci_get_user_id( $p_user ) { $t_user_id = 0; - if( (int) $p_user['id'] != 0 ) { + if ( isset( $p_user['id'] ) && (int) $p_user['id'] != 0 ) { $t_user_id = (int) $p_user['id']; - } else { - if( isset( $p_user['name'] ) ) { - $t_user_id = user_get_id_by_name( $p_user['name'] ); - } + } elseif ( isset( $p_user['name'] ) ) { + $t_user_id = user_get_id_by_name( $p_user['name'] ); } return $t_user_id; | ||||
MantisBT: master-1.2.x 5ea26915 2010-02-26 18:39 Details Diff |
Fixes 0011427: Undefined index: id Fix provided by vboctor, supplemented with a SOAP test. |
Affected Issues 0011427 |
|
mod - tests/soap/IssueAddTest.php | Diff File | ||
mod - api/soap/mc_api.php | Diff File | ||
MantisBT: master 44be8f3f 2010-02-26 18:39 Details Diff |
Fixes 0011427: Undefined index: id Fix provided by vboctor, supplemented with a SOAP test. |
Affected Issues 0011427 |
|
mod - tests/soap/IssueAddTest.php | Diff File | ||
mod - api/soap/mc_api.php | Diff File |