Skip to content

Commit b88e409

Browse files
committedJul 3, 2012
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
1 parent aca7cf7 commit b88e409

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎core/html_api.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1321,7 +1321,7 @@ function html_status_legend() {
13211321
$width = (int)( 100 / count( $t_status_array ) );
13221322
$t_status_enum_string = config_get('status_enum_string' );
13231323
foreach( $t_status_array as $t_status => $t_name ) {
1324-
$t_val = $t_status_names[$t_status];
1324+
$t_val = isset( $t_status_names[$t_status] ) ? $t_status_names[$t_status] : $t_status_array[$t_status];
13251325
$t_status_label = MantisEnum::getLabel( $t_status_enum_string, $t_status );
13261326

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

0 commit comments

Comments
 (0)
Please sign in to comment.