Skip to content

Commit

Permalink
Fix #14842: Incorrect matching of versions in print_version_option_list
Browse files Browse the repository at this point in the history
When comparing versions to determine which ones have already been added
to the select list, a loose comparison is performed, so '1' matches
'1.0'.

This causes issues when editing a bug having a version currently
obsolete matching another, previously displayed version. In that case
the obsolete version is not added to the selection list, causing data
loss when the bug is saved (see issue #13096).
  • Loading branch information
dregad committed Oct 18, 2012
1 parent 5cd0e5c commit 62a24e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/print_api.php
Expand Up @@ -724,7 +724,7 @@ function print_version_option_list( $p_version = '', $p_project_id = null, $p_re

$t_version = string_attribute( $version['version'] );

if ( !in_array( $t_version, $t_listed ) ) {
if ( !in_array( $t_version, $t_listed, true ) ) {
$t_listed[] = $t_version;
echo '<option value="' . $t_version . '"';
check_selected( $p_version, $version['version'] );
Expand Down

0 comments on commit 62a24e9

Please sign in to comment.