Move the declaration of $i variable at the top to avoid PHP Warnings when no Players are selected

This commit is contained in:
savvasha
2018-10-21 10:05:38 +03:00
parent 3eea31144b
commit b5353f2d96

View File

@@ -28,6 +28,7 @@ $identifier = uniqid( 'performance_' );
if ( true == $responsive && $mode == 'values' ){
//sportspress_responsive_tables_css( $identifier );
}
$i = 0;
?>
<div class="sp-template sp-template-event-performance sp-template-event-performance-<?php echo $mode; ?><?php if ( isset( $class ) ) { echo ' ' . $class; } ?>">
<?php if ( $caption ): ?>
@@ -75,7 +76,6 @@ if ( true == $responsive && $mode == 'values' ){
$stars_type = get_option( 'sportspress_event_performance_stars_type', 0 );
$i = 0;
foreach ( $data as $player_id => $row ):
if ( ! $player_id )