diff --git a/core/Callbacks/Structures/TrackMania/OnScoresStructure.php b/core/Callbacks/Structures/TrackMania/OnScoresStructure.php index 3918930f..52c1a9b0 100644 --- a/core/Callbacks/Structures/TrackMania/OnScoresStructure.php +++ b/core/Callbacks/Structures/TrackMania/OnScoresStructure.php @@ -37,10 +37,13 @@ class OnScoresStructure extends CommonScoresStructure { $playerScore->setRoundPoints($jsonPlayer->roundpoints); $playerScore->setBestRaceTime($jsonPlayer->bestracetime); $playerScore->setBestLapTime($jsonPlayer->bestlaptime); - $playerScore->setStuntScore($jsonPlayer->stuntsscore); $playerScore->setBestRaceCheckpoints($jsonPlayer->bestracecheckpoints); $playerScore->setBestLapCheckpoints($jsonPlayer->bestlapcheckpoints); + // removed in TM2020 + if (property_exists($jsonPlayer, 'stuntsscore')) { + $playerScore->setStuntScore($jsonPlayer->stuntsscore); + } // removed in TM2020 if (property_exists($jsonPlayer, 'bestracerespawns')) { $playerScore->setBestRaceRespawns($jsonPlayer->bestracerespawns); @@ -71,4 +74,4 @@ class OnScoresStructure extends CommonScoresStructure { } } } -} \ No newline at end of file +}