diff --git a/admin/post-types/player.php b/admin/post-types/player.php index a3ac513c..508df83f 100644 --- a/admin/post-types/player.php +++ b/admin/post-types/player.php @@ -93,7 +93,7 @@ function sp_player_stats_meta( $post ) { $data = array(); // Get all leagues populated with stats where available - $data[ $team_id ] = sp_array_combine( $div_ids, $stats[ $team_id ] ); + $data[ $team_id ] = sp_array_combine( $div_ids, sp_array_value( $stats, $team_id, array() ) ); // Get equations from statistics variables $equations = sp_get_var_equations( 'sp_statistic' ); diff --git a/sportspress-functions.php b/sportspress-functions.php index bf53644d..cd3acffc 100644 --- a/sportspress-functions.php +++ b/sportspress-functions.php @@ -285,7 +285,7 @@ if ( !function_exists( 'sp_post_checklist' ) ) { $selected = sp_array_between( (array)get_post_meta( $post_id, $meta, false ), 0, $index ); $posts = get_pages( array( 'post_type' => $meta, 'number' => 0 ) ); if ( empty( $posts ) ) - $posts = get_posts( array( 'post_type' => $meta, 'numberposts' => 0 ) ); + $posts = get_posts( array( 'post_type' => $meta, 'numberposts' => -1, 'post_per_page' => -1 ) ); foreach ( $posts as $post ): $parents = get_post_ancestors( $post ); if ( $filter ): @@ -813,7 +813,7 @@ if ( !function_exists( 'sp_event_players_table' ) ) { $label ): $player_id = 0; - $player_statistics = $data[0]; + $player_statistics = sp_array_value( $data, 0, array() ); $value = sp_array_value( $player_statistics, $column, '' ); ?>