Fix empty results error

This commit is contained in:
Brian Miyaji
2016-09-26 16:26:15 +10:00
parent d6bb679e43
commit c513eefbf8
2 changed files with 3 additions and 1 deletions

View File

@@ -56,7 +56,7 @@
$status = __( 'Preview', 'sportspress' );
}
if ( $show_results ) {
if ( $show_results && ! empty( $results ) ) {
?>
<h5 class="sp-event-results">
<?php echo '<span class="sp-result">' . implode( '</span> - <span class="sp-result">', apply_filters( 'sportspress_event_blocks_team_result_or_time', $results, $id ) ) . '</span>'; ?>

View File

@@ -33,6 +33,8 @@ if ( $show_results ) {
} else {
$show_time = false;
}
} else {
$results = array();
}
sp_get_template( 'event-logos-' . $layout . '.php', array(