Fix empty results error
This commit is contained in:
@@ -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>'; ?>
|
||||
|
||||
@@ -33,6 +33,8 @@ if ( $show_results ) {
|
||||
} else {
|
||||
$show_time = false;
|
||||
}
|
||||
} else {
|
||||
$results = array();
|
||||
}
|
||||
|
||||
sp_get_template( 'event-logos-' . $layout . '.php', array(
|
||||
|
||||
Reference in New Issue
Block a user