View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0024462 | mantisbt | api soap | public | 2018-05-20 16:14 | 2018-06-06 00:39 |
Reporter | rheydenr | Assigned To | atrol | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 2.14.0 | ||||
Target Version | 2.15.0 | Fixed in Version | 2.15.0 | ||
Summary | 0024462: Error while querying for issue header with PHP 7.2 | ||||
Description | If you call mci_issue_data_as_header_array then you get the error message "count(): Parameter must be an array or an object that implements Countable" from PHP if you use PHP from version 7.2 on. This breaks the mylyn connector in Eclipse IDE (unable to get the issues list). | ||||
Tags | No tags attached. | ||||
Attached Files | mc_issue_api.php.patch (506 bytes)
27a28,29 > use Mantis\Exceptions\ClientException; > 489c491 < return count( $t_custom_fields ) == 0 ? null : $t_custom_fields; --- > return /* count( $t_custom_fields ) == 0 ? null : */ $t_custom_fields; 601c603 < return (count( $t_relationships ) == 0 ? null : $t_relationships ); --- > return /* count( $t_relationships ) == 0 ? null : */ $t_relationships ; 680c682 < return count( $t_result ) == 0 ? null : $t_result; --- > return /* count( $t_result ) == 0 ? null : */ $t_result; | ||||
PR https://github.com/mantisbt/mantisbt/pull/1353 Thanks @rheydenr for your contribution. |
|
I am not sure if this is the right fix, as I had to change also our tests. If there is an issue without notes, attachments, custom fields and relationships, this is an example extract of a response after the change
before the change we had
Pros of the change
Cons of the change
I am not experienced in writing SOAP clients. |
|
ok, perhaps it was a too "quick" hack. I'll review it and test it for myself. |
|
@rheydenr could you please try if this fixes your issue https://github.com/mantisbt/mantisbt/pull/1354 ? |
|