MantisBT: master 0e5ad6ca

Author Committer Branch Timestamp Parent
dhx dhx master 2010-02-28 20:22 master 904e4943
Affected Issues  0011571: Cannot edit some versions
Changeset

Fix 0011571: Versions 1.1 and 1.10 are treated as duplicates

A problem was discovered on manage_proj_edit_page.php where if versions
1.1 and 1.10 were both shown, clicking 'edit' for 1.1 would bring up the
edit version page for the 1.10 version instead.

This is due to an incorrect version name comparison in version_get_id
whereby the following check between strings was occurring:

if( "1.1" == "1.10" ) { ... }

PHP evaluates this expression to true because 1.1 and 1.10 are treated
as floats. We however need to preserve the string type during this
comparison, thus we need to use the === comparison operator instead.

mod - core/version_api.php Diff File