diff --git a/app/Filament/Widgets/PlayerPropsDrop.php b/app/Filament/Widgets/PlayerPropsDrop.php index 1ef34cf7..514fcec1 100644 --- a/app/Filament/Widgets/PlayerPropsDrop.php +++ b/app/Filament/Widgets/PlayerPropsDrop.php @@ -349,7 +349,7 @@ class PlayerPropsDrop extends Widget $count_player = 0; foreach ($player_totals as $key => $value) { - if (isset($value->details) && $value->details->position != 'GK' && (int) $value->details->is_active != 0) { + if ($value->details != null && $value->details->position != 'GK' && (int) $value->details->is_active != 0) { $count_player++; } } diff --git a/app/Livewire/PlayerCalculator.php b/app/Livewire/PlayerCalculator.php index 21750e00..5b751793 100644 --- a/app/Livewire/PlayerCalculator.php +++ b/app/Livewire/PlayerCalculator.php @@ -16,7 +16,7 @@ class PlayerCalculator extends Component $result = []; foreach ($player as $val) { - if ($val->details && $val->details->is_active) { + if ($val->details != null && $val->details->is_active) { $tmp = []; $tmp['id'] = $val->ss_player_id;