From 56d829540c42573429cd939acd138404bb5bfaff Mon Sep 17 00:00:00 2001 From: savvasha Date: Fri, 1 Oct 2021 08:16:18 +0300 Subject: [PATCH] FIX2: PHP 8.0: Deprecate required parameters after optional parameters in function/method signatures --- includes/class-sp-league-table.php | 2 +- includes/sp-deprecated-functions.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/class-sp-league-table.php b/includes/class-sp-league-table.php index 5e0a0131..5f70182d 100644 --- a/includes/class-sp-league-table.php +++ b/includes/class-sp-league-table.php @@ -954,7 +954,7 @@ class SP_League_Table extends SP_Secondary_Post { * @param string $column * @return null */ - public function add_gb( &$a, $w = null, $l = null, $column ) { + public function add_gb( &$a, $w = null, $l = null, $column = null ) { if ( ! is_array( $a ) ) return; if ( ! $w && ! $l ) return; diff --git a/includes/sp-deprecated-functions.php b/includes/sp-deprecated-functions.php index e7977f2f..bcdb1f6d 100644 --- a/includes/sp-deprecated-functions.php +++ b/includes/sp-deprecated-functions.php @@ -109,7 +109,7 @@ function sportspress_edit_player_list_table( $columns = array(), $usecolumns = n function sportspress_edit_team_columns_table( $league_id, $columns = array(), $data = array(), $placeholders = array(), $merged = array(), $seasons = array(), $readonly = true ) { return sp_edit_team_columns_table( $league_id, $columns, $data, $placeholders, $merged, $seasons, $readonly ); } -function sportspress_edit_player_performance_table( $id = null, $league_id, $columns = array(), $data = array(), $placeholders = array(), $merged = array(), $seasons_teams = array(), $readonly = true ) { +function sportspress_edit_player_performance_table( $id = null, $league_id = null, $columns = array(), $data = array(), $placeholders = array(), $merged = array(), $seasons_teams = array(), $readonly = true ) { return sp_edit_player_performance_table( $id, $league_id, $columns, $data, $placeholders, $merged, $seasons_teams, $readonly ); } function sportspress_edit_event_results_table( $columns = array(), $data = array() ) { @@ -121,7 +121,7 @@ function sportspress_event_player_status_selector( $team_id, $player_id, $value function sportspress_event_player_sub_selector( $team_id, $player_id, $value, $data = array() ) { return sp_event_player_sub_selector( $team_id, $player_id, $value, $data ); } -function sportspress_edit_event_players_table( $columns = array(), $data = array(), $team_id ) { +function sportspress_edit_event_players_table( $columns = array(), $data = array(), $team_id = null ) { return sp_edit_event_players_table( $columns, $data, $team_id ); } function sportspress_post_adder( $post_type = 'post', $label = null ) {