View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0025997 | mantisbt | api rest | public | 2019-08-14 08:32 | 2019-08-25 12:36 |
| Reporter | dregad | Assigned To | dregad | ||
| Priority | normal | Severity | minor | Reproducibility | sometimes |
| Status | closed | Resolution | fixed | ||
| Product Version | 2.18.0 | ||||
| Target Version | 2.22.0 | Fixed in Version | 2.22.0 | ||
| Summary | 0025997: Invalid JSON response when creating issue with tag by name via REST API | ||||
| Description | When attempting to create an issue with the REST API and the payload includes at least one existing tag specified by name, IssueAddCommand::process() triggers a PHP notice as it checks the value of Depending on PHP error_reporting settings, an HTML error message is appended to the expected JSON response, causing it to become invalid. | ||||
| Steps To Reproduce |
Returns | ||||
| Tags | No tags attached. | ||||
|
The same problem occurs if the user attempting to create the issue does not have the required privileges to create tags (in that case, the NOTICE is thrown in IssueAddCommand::validate() at line 222). |
|
|
MantisBT: master 4e786bd2 2019-08-14 03:34 Details Diff |
Fix PHP Notice in IssueAddCommand The code did not check for existence of `id` key in $t_tag before trying to access it. This caused REST API to generate an invalid JSON response when creating issue with tag by name. Fixes 0025997 |
Affected Issues 0025997 |
|
| mod - core/commands/IssueAddCommand.php | Diff File | ||