From 44f9996a2a9012a15c69c8505b63f804fb16af8c Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Wed, 14 Jan 2015 00:49:20 +1100 Subject: [PATCH] Check if players exist in event fix #106 --- includes/class-sp-event.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-sp-event.php b/includes/class-sp-event.php index cea2c540..7e066591 100644 --- a/includes/class-sp-event.php +++ b/includes/class-sp-event.php @@ -108,7 +108,7 @@ class SP_Event extends SP_Custom_Post{ endif; // Move individual players to top level of array - if ( array_key_exists( 0, $performance ) ) { + if ( array_key_exists( 0, $performance ) && is_array( $performance[0] ) ) { foreach ( $performance[ 0 ] as $player_id => $player_performance ) { $performance[ $player_id ] = array( $player_id => $player_performance ); }