Fix error on event page frontend when no venue is selected reported in https://app.asana.com/0/11138574964139/11272871785063

This commit is contained in:
Brian Miyaji
2014-03-29 15:32:05 +11:00
parent cbffc6fd73
commit 8488cf56bc

View File

@@ -4,12 +4,12 @@ if ( ! isset( $id ) )
$venues = get_the_terms( $id, 'sp_venue' );
if ( ! $venues )
return;
$show_maps = get_option( 'sportspress_event_show_maps', 'yes' ) == 'yes' ? true : false;
$link_venues = get_option( 'sportspress_event_link_venues', 'no' ) == 'yes' ? true : false;
if ( ! $venues )
return $output;
foreach( $venues as $venue ):
$t_id = $venue->term_id;
$term_meta = get_option( "taxonomy_$t_id" );