Skip to content

Commit

Permalink
Fix system warning in html_status_legend() with custom status
Browse files Browse the repository at this point in the history
When using custom status for which no language strings are defined,
html_status_legend() triggered system warnings.

MantisBT now displays the custom status' name as defined in the enum,
in case there is no available translation string.

Fixes #14446
  • Loading branch information
dregad committed Jul 3, 2012
1 parent aca7cf7 commit b88e409
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/html_api.php
Expand Up @@ -1321,7 +1321,7 @@ function html_status_legend() {
$width = (int)( 100 / count( $t_status_array ) );
$t_status_enum_string = config_get('status_enum_string' );
foreach( $t_status_array as $t_status => $t_name ) {
$t_val = $t_status_names[$t_status];
$t_val = isset( $t_status_names[$t_status] ) ? $t_status_names[$t_status] : $t_status_array[$t_status];
$t_status_label = MantisEnum::getLabel( $t_status_enum_string, $t_status );

echo "<td class=\"small-caption $t_status_label-color\">$t_val</td>";
Expand Down

0 comments on commit b88e409

Please sign in to comment.