From e77c8e5a8fbe5a8141e7bf049d31972e62752be3 Mon Sep 17 00:00:00 2001 From: flashwave Date: Tue, 14 Nov 2023 20:25:59 +0000 Subject: [PATCH] Attempt to fix !s3fests command. --- src/Splatoon/Splatoon3/Splatoon3FestivalTeam.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Splatoon/Splatoon3/Splatoon3FestivalTeam.php b/src/Splatoon/Splatoon3/Splatoon3FestivalTeam.php index 219264b..7e78108 100644 --- a/src/Splatoon/Splatoon3/Splatoon3FestivalTeam.php +++ b/src/Splatoon/Splatoon3/Splatoon3FestivalTeam.php @@ -40,11 +40,11 @@ class Splatoon3FestivalTeam implements ISplatoonFestivalTeam { } public function hasResults(): bool { - return array_key_exists('result', $this->teamInfo); + return array_key_exists('result', $this->teamInfo) && is_array($this->teamInfo['result']); } public function isWinner(): bool { - return $this->teamInfo['result']['isWinner']; + return $this->hasResults() && $this->teamInfo['result']['isWinner']; } public function getResults(): array {