Attempt to fix !s3fests command.

This commit is contained in:
flash 2023-11-14 20:25:59 +00:00
parent 91dd716b3c
commit e77c8e5a8f

View file

@ -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 {