Index: bug_report.php =================================================================== --- bug_report.php (revision 449) +++ bug_report.php (working copy) @@ -126,9 +126,11 @@ trigger_error( ERROR_EMPTY_FIELD, ERROR ); } - if ( !custom_field_validate( $t_id, gpc_get_custom_field( "custom_field_$t_id", $t_def['type'], NULL ) ) ) { - error_parameters( lang_get_defaulted( custom_field_get_field( $t_id, 'name' ) ) ); - trigger_error( ERROR_CUSTOM_FIELD_INVALID_VALUE, ERROR ); + if ( $t_def['require_report'] ) { + if ( !custom_field_validate( $t_id, gpc_get_custom_field( "custom_field_$t_id", $t_def['type'], NULL ) ) ) { + error_parameters( lang_get_defaulted( custom_field_get_field( $t_id, 'name' ) ) ); + trigger_error( ERROR_CUSTOM_FIELD_INVALID_VALUE, ERROR ); + } } } @@ -162,10 +164,12 @@ } $t_def = custom_field_get_definition( $t_id ); - if( !custom_field_set_value( $t_id, $t_bug_id, gpc_get_custom_field( "custom_field_$t_id", $t_def['type'], $t_def['default_value'] ), false ) ) { - error_parameters( lang_get_defaulted( custom_field_get_field( $t_id, 'name' ) ) ); - trigger_error( ERROR_CUSTOM_FIELD_INVALID_VALUE, ERROR ); - } + if ( $t_def['require_report'] ) { + if( !custom_field_set_value( $t_id, $t_bug_id, gpc_get_custom_field( "custom_field_$t_id", $t_def['type'], $t_def['default_value'] ), false ) ) { + error_parameters( lang_get_defaulted( custom_field_get_field( $t_id, 'name' ) ) ); + trigger_error( ERROR_CUSTOM_FIELD_INVALID_VALUE, ERROR ); + } + } } $f_master_bug_id = gpc_get_int( 'm_id', 0 );