Display zeroes when totals are blank in event results

This commit is contained in:
Brian Miyaji
2014-02-18 13:23:13 +11:00
parent 94ac918e0c
commit f07f60d593

View File

@@ -87,7 +87,12 @@ if ( !function_exists( 'sportspress_event_players' ) ) {
if ( $key == 'name' ): if ( $key == 'name' ):
continue; continue;
endif; endif;
$output .= '<td class="data-' . $key . '">' . sportspress_array_value( $row, $key, '&mdash;' ) . '</td>'; if ( array_key_exists( $key, $row ) && $row[ $key ] != '' ):
$value = $row[ $key ];
else:
$value = 0;
endif;
$output .= '<td class="data-' . $key . '">' . $value . '</td>';
endforeach; endforeach;
$output .= '</tr></tfoot>'; $output .= '</tr></tfoot>';