diff --git a/account_prefs_inc.php b/account_prefs_inc.php index 06f857af4c..607469293e 100644 --- a/account_prefs_inc.php +++ b/account_prefs_inc.php @@ -92,7 +92,7 @@ function edit_account_prefs($p_user_id = null, $p_error_if_protected = true, $p_ @@ -118,117 +118,117 @@ function edit_account_prefs($p_user_id = null, $p_error_if_protected = true, $p_
- email_on_new, ON ); ?> /> + email_on_new, ON ); ?> />
- email_on_assigned, ON ); ?> /> + email_on_assigned, ON ); ?> />
- email_on_feedback, ON ); ?> /> + email_on_feedback, ON ); ?> />
- email_on_resolved, ON ); ?> /> + email_on_resolved, ON ); ?> />
- email_on_closed, ON ); ?> /> + email_on_closed, ON ); ?> />
- email_on_reopened, ON ); ?> /> + email_on_reopened, ON ); ?> />
- email_on_bugnote, ON ); ?> /> + email_on_bugnote, ON ); ?> />
- email_on_status, ON ); ?> /> + email_on_status, ON ); ?> />
- email_on_priority , ON); ?> /> + email_on_priority , ON); ?> /> diff --git a/bug_report_page.php b/bug_report_page.php index 7d848eab91..1236c62c75 100644 --- a/bug_report_page.php +++ b/bug_report_page.php @@ -133,7 +133,7 @@ $f_description = $t_bug->description; $f_steps_to_reproduce = $t_bug->steps_to_reproduce; $f_additional_info = $t_bug->additional_information; - $f_view_state = $t_bug->view_state; + $f_view_state = (int)$t_bug->view_state; $f_due_date = $t_bug->due_date; $t_project_id = $t_bug->project_id; @@ -150,15 +150,15 @@ $f_handler_id = gpc_get_int( 'handler_id', 0 ); $f_category_id = gpc_get_int( 'category_id', 0 ); - $f_reproducibility = gpc_get_int( 'reproducibility', config_get( 'default_bug_reproducibility' ) ); - $f_eta = gpc_get_int( 'eta', config_get( 'default_bug_eta' ) ); - $f_severity = gpc_get_int( 'severity', config_get( 'default_bug_severity' ) ); - $f_priority = gpc_get_int( 'priority', config_get( 'default_bug_priority' ) ); + $f_reproducibility = gpc_get_int( 'reproducibility', (int)config_get( 'default_bug_reproducibility' ) ); + $f_eta = gpc_get_int( 'eta', (int)config_get( 'default_bug_eta' ) ); + $f_severity = gpc_get_int( 'severity', (int)config_get( 'default_bug_severity' ) ); + $f_priority = gpc_get_int( 'priority', (int)config_get( 'default_bug_priority' ) ); $f_summary = gpc_get_string( 'summary', '' ); $f_description = gpc_get_string( 'description', '' ); $f_steps_to_reproduce = gpc_get_string( 'steps_to_reproduce', config_get( 'default_bug_steps_to_reproduce' ) ); $f_additional_info = gpc_get_string( 'additional_info', config_get ( 'default_bug_additional_info' ) ); - $f_view_state = gpc_get_int( 'view_state', config_get( 'default_bug_view_status' ) ); + $f_view_state = gpc_get_int( 'view_state', (int)config_get( 'default_bug_view_status' ) ); $f_due_date = gpc_get_string( 'due_date', ''); if ( $f_due_date == '' ) { diff --git a/bug_update_advanced_page.php b/bug_update_advanced_page.php index 58c1acb383..d1db64c1c3 100644 --- a/bug_update_advanced_page.php +++ b/bug_update_advanced_page.php @@ -229,7 +229,7 @@ if ( $tpl_can_change_view_state ) { echo ''; } else if ( $tpl_show_view_state ) { echo $tpl_view_state; @@ -449,7 +449,7 @@ if ( $tpl_show_eta ) { echo ''; echo ''; } else { $t_spacer += 2; diff --git a/core/filter_api.php b/core/filter_api.php index debadc1bba..8946ec6c27 100644 --- a/core/filter_api.php +++ b/core/filter_api.php @@ -496,19 +496,19 @@ function filter_ensure_valid_filter( $p_filter_arr ) { if( !isset( $p_filter_arr[FILTER_PROPERTY_PLATFORM] ) ) { $p_filter_arr[FILTER_PROPERTY_PLATFORM] = array( - 0 => META_FILTER_ANY, + 0 => (string)META_FILTER_ANY, ); } if( !isset( $p_filter_arr[FILTER_PROPERTY_OS] ) ) { $p_filter_arr[FILTER_PROPERTY_OS] = array( - 0 => META_FILTER_ANY, + 0 => (string)META_FILTER_ANY, ); } if( !isset( $p_filter_arr[FILTER_PROPERTY_OS_BUILD] ) ) { $p_filter_arr[FILTER_PROPERTY_OS_BUILD] = array( - 0 => META_FILTER_ANY, + 0 => (string)META_FILTER_ANY, ); } @@ -555,7 +555,7 @@ function filter_ensure_valid_filter( $p_filter_arr ) { $p_filter_arr[FILTER_PROPERTY_RELATIONSHIP_BUG] = gpc_get_int( FILTER_PROPERTY_RELATIONSHIP_BUG, 0 ); } if( !isset( $p_filter_arr[FILTER_PROPERTY_TARGET_VERSION] ) ) { - $p_filter_arr[FILTER_PROPERTY_TARGET_VERSION] = META_FILTER_ANY; + $p_filter_arr[FILTER_PROPERTY_TARGET_VERSION] = (string)META_FILTER_ANY; } if( !isset( $p_filter_arr[FILTER_PROPERTY_TAG_STRING] ) ) { $p_filter_arr[FILTER_PROPERTY_TAG_STRING] = gpc_get_string( FILTER_PROPERTY_TAG_STRING, '' ); @@ -582,7 +582,7 @@ function filter_ensure_valid_filter( $p_filter_arr ) { break; case FILTER_TYPE_MULTI_STRING: - $p_filter_arr[ $t_field_name ] = gpc_get_string_array( $t_field_name, array( 0 => META_FILTER_ANY ) ); + $p_filter_arr[ $t_field_name ] = gpc_get_string_array( $t_field_name, array( 0 => (string)META_FILTER_ANY ) ); break; case FILTER_TYPE_MULTI_INT: @@ -590,7 +590,7 @@ function filter_ensure_valid_filter( $p_filter_arr ) { break; default: - $p_filter_arr[ $t_field_name ] = META_FILTER_ANY; + $p_filter_arr[ $t_field_name ] = (string)META_FILTER_ANY; } } @@ -606,9 +606,9 @@ function filter_ensure_valid_filter( $p_filter_arr ) { if( is_array( $t_custom_fields ) && ( count( $t_custom_fields ) > 0 ) ) { foreach( $t_custom_fields as $t_cfid ) { if( is_array( gpc_get( 'custom_field_' . $t_cfid, null ) ) ) { - $f_custom_fields_data[$t_cfid] = gpc_get_string_array( 'custom_field_' . $t_cfid, META_FILTER_ANY ); + $f_custom_fields_data[$t_cfid] = gpc_get_string_array( 'custom_field_' . $t_cfid, (string)META_FILTER_ANY ); } else { - $f_custom_fields_data[$t_cfid] = gpc_get_string( 'custom_field_' . $t_cfid, META_FILTER_ANY ); + $f_custom_fields_data[$t_cfid] = gpc_get_string( 'custom_field_' . $t_cfid, (string)META_FILTER_ANY ); $f_custom_fields_data[$t_cfid] = array( $f_custom_fields_data[$t_cfid], ); @@ -760,7 +760,7 @@ function filter_get_default() { $t_filter = array( FILTER_PROPERTY_CATEGORY_ID => Array( - '0' => META_FILTER_ANY, + '0' => (string)META_FILTER_ANY, ), FILTER_PROPERTY_SEVERITY => Array( '0' => META_FILTER_ANY, @@ -782,10 +782,10 @@ function filter_get_default() { '0' => META_FILTER_ANY, ), FILTER_PROPERTY_BUILD => Array( - '0' => META_FILTER_ANY, + '0' => (string)META_FILTER_ANY, ), FILTER_PROPERTY_VERSION => Array( - '0' => META_FILTER_ANY, + '0' => (string)META_FILTER_ANY, ), FILTER_PROPERTY_HIDE_STATUS => Array( '0' => $t_hide_status_default, @@ -3386,7 +3386,7 @@ function filter_draw_selection_area2( $p_page_number, $p_for_screen = true, $p_e $t_query_name ) { echo '' . "\n"; print_subproject_option_list( $t_id, $p_project_id, $p_filter_project_id, $p_trace, $p_parents ); } @@ -554,7 +560,9 @@ function print_profile_option_list_from_profiles( $p_profiles, $p_select_id ) { $t_os_build = string_attribute( $t_profile['os_build'] ); echo ''; } } @@ -586,7 +594,7 @@ function print_category_option_list( $p_category_id = 0, $p_project_id = null ) $cat_arr = category_get_all_rows( $t_project_id, /* inherit */ null, /* sortByProject */ true ); foreach( $cat_arr as $t_category_row ) { - $t_category_id = $t_category_row['id']; + $t_category_id = (int)$t_category_row['id']; echo "'; @@ -606,7 +614,7 @@ function print_category_filter_option_list( $p_category_name = '', $p_project_id foreach( $t_cat_arr as $t_cat ) { $t_name = string_attribute( $t_cat ); echo ''; } } @@ -616,10 +624,10 @@ function print_category_filter_option_list( $p_category_name = '', $p_project_id function print_platform_option_list( $p_platform, $p_user_id = null ) { $t_platforms_array = profile_get_field_all_for_user( 'platform', $p_user_id ); - foreach( $t_platforms_array as $t_platform ) { - $t_platform = string_attribute( $t_platform ); + foreach( $t_platforms_array as $t_platform_unescaped ) { + $t_platform = string_attribute( $t_platform_unescaped ); echo ''; } } @@ -629,10 +637,10 @@ function print_platform_option_list( $p_platform, $p_user_id = null ) { function print_os_option_list( $p_os, $p_user_id = null ) { $t_os_array = profile_get_field_all_for_user( 'os', $p_user_id ); - foreach( $t_os_array as $t_os ) { - $t_os = string_attribute( $t_os ); + foreach( $t_os_array as $t_os_unescaped ) { + $t_os = string_attribute( $t_os_unescaped ); echo ''; } } @@ -641,10 +649,10 @@ function print_os_option_list( $p_os, $p_user_id = null ) { function print_os_build_option_list( $p_os_build, $p_user_id = null ) { $t_os_build_array = profile_get_field_all_for_user( 'os_build', $p_user_id ); - foreach( $t_os_build_array as $t_os_build ) { - $t_os_build = string_attribute( $t_os_build ); + foreach( $t_os_build_array as $t_os_build_unescaped ) { + $t_os_build = string_attribute( $t_os_build_unescaped ); echo ''; } } @@ -706,7 +714,7 @@ function print_version_option_list( $p_version = '', $p_project_id = null, $p_re if ( !in_array( $t_version, $t_listed ) ) { $t_listed[] = $t_version; echo '"; } } diff --git a/core/profile_api.php b/core/profile_api.php index 742c35409f..54fd335dd6 100644 --- a/core/profile_api.php +++ b/core/profile_api.php @@ -335,7 +335,7 @@ function profile_get_default( $p_user_id ) { WHERE user_id=" . db_param(); $result = db_query_bound( $query, Array( $c_user_id ) ); - $t_default_profile = db_result( $result, 0, 0 ); + $t_default_profile = (int)db_result( $result, 0, 0 ); return $t_default_profile; } diff --git a/manage_custom_field_edit_page.php b/manage_custom_field_edit_page.php index 33ebb12db0..774d615c4e 100644 --- a/manage_custom_field_edit_page.php +++ b/manage_custom_field_edit_page.php @@ -82,7 +82,7 @@ @@ -106,7 +106,7 @@ @@ -115,7 +115,7 @@ @@ -137,42 +137,42 @@
- /> + />
- /> + />
- /> + />
- /> + />
- /> + />
- /> + />
- /> + />
- /> + />
diff --git a/manage_proj_cat_edit_page.php b/manage_proj_cat_edit_page.php index a6e2d4c6df..422aaa9ac1 100644 --- a/manage_proj_cat_edit_page.php +++ b/manage_proj_cat_edit_page.php @@ -56,8 +56,8 @@ $f_project_id = gpc_get_int( 'project_id' ); $t_row = category_get_row( $f_category_id ); -$t_assigned_to = $t_row['user_id']; -$t_project_id = $t_row['project_id']; +$t_assigned_to = (int)$t_row['user_id']; +$t_project_id = (int)$t_row['project_id']; $t_name = $t_row['name']; access_ensure_project_level( config_get( 'manage_project_threshold' ), $t_project_id ); diff --git a/manage_proj_edit_page.php b/manage_proj_edit_page.php index d2ff9c3297..10416cf418 100644 --- a/manage_proj_edit_page.php +++ b/manage_proj_edit_page.php @@ -105,26 +105,26 @@
- /> + />
- /> + />
diff --git a/manage_user_edit_page.php b/manage_user_edit_page.php index 9bbdd8a07b..b763fd07f4 100644 --- a/manage_user_edit_page.php +++ b/manage_user_edit_page.php @@ -141,7 +141,7 @@ if ( !MantisEnum::hasValue( config_get( 'access_levels_enum_string' ), $t_access_level ) ) { $t_access_level = config_get( 'default_new_account_access_level' ); } - print_project_access_levels_option_list( $t_access_level ); ?> + print_project_access_levels_option_list( (int)$t_access_level ); ?> @@ -149,13 +149,13 @@
- /> + />
- /> + />
diff --git a/tag_update_page.php b/tag_update_page.php index 0d10bee9c2..29fba42bc2 100644 --- a/tag_update_page.php +++ b/tag_update_page.php @@ -96,7 +96,7 @@ if ( access_has_global_level( config_get( 'tag_edit_threshold' ) ) ) { echo ''; echo ''; } else { ?>