Skip to content

Commit

Permalink
Fixed warning: Trying to access array offset on false
Browse files Browse the repository at this point in the history
  • Loading branch information
programarivm committed Oct 12, 2024
1 parent 8fe6dd6 commit 3cb572d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Command/Game/Async/RestartTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ public function run()
$decoded = $this->params['decoded'];
$decoded->iat = time();
$decoded->exp = time() + 3600; // one hour by default
$decoded->elo->{Color::W} = $w['elo'];
$decoded->elo->{Color::B} = $b['elo'];
$decoded->elo->{Color::W} = $w['elo'] ?? $decoded->elo->{Color::W};
$decoded->elo->{Color::B} = $b['elo'] ?? $decoded->elo->{Color::B};

return $decoded;
}
Expand Down

0 comments on commit 3cb572d

Please sign in to comment.