Fix twig exception thrown when player does not exist

This commit is contained in:
slawkens 2023-06-28 15:15:14 +02:00
parent bf9d440a95
commit 4f1235bfe9

View File

@ -57,7 +57,7 @@ if($show_form) {
$twig->display('error_box.html.twig', array('errors' => $errors)); $twig->display('error_box.html.twig', array('errors' => $errors));
} }
if(isset($player)) { if(isset($player) && $player->isLoaded()) {
$twig->display('account.change_comment.html.twig', array( $twig->display('account.change_comment.html.twig', array(
'player' => $player 'player' => $player
)); ));