Browse files

Fix system warning in html_status_legend() with custom status

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...
1 parent aca7cf7 commit b88e409e5f7023cdc026ae6ad2d78c6a64e71d27 @dregad dregad committed Jul 3, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 core/html_api.php
View
2 core/html_api.php
@@ -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>";

0 comments on commit b88e409

Please sign in to comment.