View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0026541 | mantisbt | api rest | public | 2019-12-30 12:38 | 2020-03-15 15:23 |
Reporter | mnewnham | Assigned To | dregad | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 2.22.1 | ||||
Target Version | 2.24.0 | Fixed in Version | 2.24.0 | ||
Summary | 0026541: Passing invalid id to rest api custom field update causes program crash | ||||
Description | A trivial update to a custom field, with an invalid custom field id causes the following untrapped error (reported in Apache log): PHP Fatal error: 1300 in /home/mantisbt/mantisbt-2.22.1/core/custom_field_api.php on line 392 This is in the code function custom_field_ensure_exists( $p_field_id ) { | ||||
Steps To Reproduce | Create a simple API update $c = new stdClass; $jsonData = json_encode($c); //-------------> PUSH TO API | ||||
Tags | No tags attached. | ||||
MantisBT: master b01b6779 2020-02-02 11:22 Details Diff |
Get & validate custom field using standard API Use mci_get_custom_field_id_from_objectref() to retrieve the custom field's id. Throw exceptions if - the returned Id == 0 (invalid field) - the field is not linked to the current project Fixes 0026541 |
Affected Issues 0026541 |
|
mod - api/soap/mc_project_api.php | Diff File |