MantisBT: master-2.25 6671bc5c

Author Committer Branch Timestamp Parent
dregad dregad master-2.25 2023-03-01 11:41 master-2.25 a8e71edc
Affected Issues  0031889: Product Version / Target Version - Date missing
 0032086: IssueViewPageCommand.php line 135: 'Undefined array key "version" with php 8.1.16

Fix error when displaying Issue without Version

Commit d9464fe8132f6cfd694625c8d050575aed95d5ba introduced a regression
when displaying an Issue without Product, Target or Fixed In Version:

APPLICATION ERROR 1601 - Version "" not found
PHP Notice (or Warning on 8.1+): Undefined array key "version"

This is because mci_issue_data_as_array() removes null keys and empty
arrays from the Issue data, so the IssueViewPageCommand needs to check
for array key existence before calling prepared_version_string().

Fixes 0032086, 0031889

mod - core/commands/IssueViewPageCommand.php Diff File