Skip to content

Commit 62a24e9

Browse files
committedOct 18, 2012
Fix #14842: Incorrect matching of versions in print_version_option_list
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).
1 parent 5cd0e5c commit 62a24e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎core/print_api.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ function print_version_option_list( $p_version = '', $p_project_id = null, $p_re
724724

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

727-
if ( !in_array( $t_version, $t_listed ) ) {
727+
if ( !in_array( $t_version, $t_listed, true ) ) {
728728
$t_listed[] = $t_version;
729729
echo '<option value="' . $t_version . '"';
730730
check_selected( $p_version, $version['version'] );

0 commit comments

Comments
 (0)
Please sign in to comment.