Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 1456034

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 21cbaef commit 1456034

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
@@ -808,7 +808,7 @@ function print_version_option_list( $p_version = '', $p_project_id = null, $p_re
808808

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

811-
if ( !in_array( $t_version, $t_listed ) ) {
811+
if ( !in_array( $t_version, $t_listed, true ) ) {
812812
$t_listed[] = $t_version;
813813
echo '<option value="' . $t_version . '"';
814814
check_selected( string_attribute( $p_version ), $t_version );

0 commit comments

Comments
 (0)
Please sign in to comment.