From beaa23954861753d9bcf5400258c06531e3f696a Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Sun, 19 Oct 2014 20:37:21 +1100 Subject: [PATCH] Fix player list and league table columns --- templates/league-table.php | 2 +- templates/player-list.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/league-table.php b/templates/league-table.php index 9cbf6279..ccad1d65 100644 --- a/templates/league-table.php +++ b/templates/league-table.php @@ -47,7 +47,7 @@ unset( $data[0] ); if ( ! $columns ) $columns = get_post_meta( $id, 'sp_columns', true ); -if ( ! is_array( $columns ) ) +if ( null !== $columns && ! is_array( $columns ) ) $columns = explode( ',', $columns ); $output .= '' . __( 'Pos', 'sportspress' ) . ''; diff --git a/templates/player-list.php b/templates/player-list.php index 45da03b1..c502ad1b 100644 --- a/templates/player-list.php +++ b/templates/player-list.php @@ -35,7 +35,7 @@ if ( isset( $performance ) ) $columns = $performance; // Explode into array -if ( ! is_array( $columns ) ) +if ( null !== $columns && ! is_array( $columns ) ) $columns = explode( ',', $columns ); $list = new SP_Player_List( $id );