Add compatibility with php 8.2

This commit is contained in:
Beu
2023-01-17 10:06:56 +01:00
parent 16889f1a6a
commit 9e8432999b
8 changed files with 25 additions and 4 deletions

View File

@ -88,9 +88,13 @@ class Map implements Dumpable, UsageInformationAble {
$this->nbCheckpoints = $mpMap->nbCheckpoints;
$this->nbLaps = $mpMap->nbLaps;
$this->authorNick = $mpMap->authorNickname;
$player = $this->maniaControl->getPlayerManager()->getPlayer($this->authorLogin);
if ($player) {
$this->authorNick = $player->nickname;
} else if ($mpMap->authorNickname !== "") {
$this->authorNick = $mpMap->authorNickname;
} else {
$this->authorNick = $this->authorLogin;
}