From: Victor B. <vb...@us...> - 2006-05-06 02:58:46
|
Update of /cvsroot/mantisbt/mantisbt/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22882/core Modified Files: filter_api.php Log Message: Fixed #7000: SYSTEM WARNING: Argument 1 to array_multisort() is expected to be an array or a sort flag. Index: filter_api.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/core/filter_api.php,v retrieving revision 1.140 retrieving revision 1.141 diff -u -d -r1.140 -r1.141 --- filter_api.php 22 Apr 2006 04:33:04 -0000 1.140 +++ filter_api.php 6 May 2006 02:58:43 -0000 1.141 @@ -3067,9 +3067,14 @@ global $t_filter, $t_accessible_custom_fields_names, $t_accessible_custom_fields_types, $t_accessible_custom_fields_values, $t_accessible_custom_fields_ids, $t_select_modifier; $t_js_toggle_func = "toggle_custom_date_field_" . $p_field_id . "_controls" ; + # Resort the values so there ordered numerically, they are sorted as strings otherwise which # may be wrong for dates before early 2001. - array_multisort($t_accessible_custom_fields_values[$p_field_num], SORT_NUMERIC, SORT_ASC) ; + if (is_array($t_accessible_custom_fields_values[$p_field_num])) + { + array_multisort($t_accessible_custom_fields_values[$p_field_num], SORT_NUMERIC, SORT_ASC); + } + if (isset($t_accessible_custom_fields_values[$p_field_num][0])) { $t_sel_start_year = date( 'Y', $t_accessible_custom_fields_values[$p_field_num][0]) ; } |