From 5a8161fb8d899f69dc8a354178c0774eb58a2f9a Mon Sep 17 00:00:00 2001 From: salam Date: Sun, 1 Nov 2026 18:26:58 +0100 Subject: [PATCH] wip --- app/Traits/PlayerProps/PlayerQuery.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Traits/PlayerProps/PlayerQuery.php b/app/Traits/PlayerProps/PlayerQuery.php index e83471d4..a9fcd05c 100644 --- a/app/Traits/PlayerProps/PlayerQuery.php +++ b/app/Traits/PlayerProps/PlayerQuery.php @@ -180,14 +180,16 @@ trait PlayerQuery { switch ($this->season_or_date) { case 'season': - if (! $this->season_selected) { $this->season_selected = $this->getCurrentSeason(); } - if ($this->season_mode == 'fullyear') { + // Keeps elements where '/' is FALSE + $this->season_selected = array_filter($this->season_selected, fn ($item) => ! str_contains($item, '/')); $this->season_selected = array_map('intval', $this->season_selected); } else { + // Keeps elements ONLY if '/' returns TRUE + $this->season_selected = array_filter($this->season_selected, fn ($item) => str_contains($item, '/')); $this->season_selected = array_map('strval', $this->season_selected); }