View Issue Details

IDProjectCategoryView StatusLast Update
0032831mantisbtcode cleanuppublic2023-10-31 16:32
Reporterdregad Assigned Todregad  
PrioritynormalSeveritytweakReproducibilityN/A
Status closedResolutionfixed 
Target Version2.26.0Fixed in Version2.26.0 
Summary0032831: Remove unnecessary check on Version Id
Description

It does not make any sense for prepare_version_string() to make a strict-type comparison of the Version Id against false.

The same goes for the null Version Id check in version_full_name().

The Caller should take care of passing a valid Version. If it is not, just throw an Exception.

Additional Information

This issue was identified while working on PR https://github.com/mantisbt/mantisbt/pull/1869 to fix 0032086.

TagsNo tags attached.

Activities

There are no notes attached to this issue.

Related Changesets

MantisBT: master 00f4f1fc

2023-03-01 12:08

dregad


Details Diff
Remove unnecessary check on Version Id

It does not make any sense for prepare_version_string() to make a
strict-type comparison of the Version Id against false.

The same goes for the null Version Id check in version_full_name().

The Caller should take care of passing a valid Version. If it is not,
just throw an Exception.

Fixes 0032831
Affected Issues
0032831
mod - core/prepare_api.php Diff File
mod - core/version_api.php Diff File
mod - manage_proj_edit_page.php Diff File