Avoid PHP > 7.1.x non-numeric values Warnings
PHP Warning: A non-numeric value encountered in /xxxx/public_html/wp-content/plugins/sportspress/includes/class-sp-player.php on line 411
This commit is contained in:
@@ -408,7 +408,7 @@ class SP_Player extends SP_Custom_Post {
|
|||||||
|
|
||||||
// Subtract minutes prior to substitution
|
// Subtract minutes prior to substitution
|
||||||
$substitution_time = sp_array_value( sp_array_value( sp_array_value( sp_array_value( $timeline, $team_id ), $this->ID ), 'sub' ), 0, 0 );
|
$substitution_time = sp_array_value( sp_array_value( sp_array_value( sp_array_value( $timeline, $team_id ), $this->ID ), 'sub' ), 0, 0 );
|
||||||
$played_minutes -= $substitution_time;
|
$played_minutes -= (int) $substitution_time;
|
||||||
else:
|
else:
|
||||||
|
|
||||||
// Starting lineup with possible substitution
|
// Starting lineup with possible substitution
|
||||||
|
|||||||
Reference in New Issue
Block a user