exception crash avoidance fixes

This commit is contained in:
kremsy
2017-02-11 23:26:28 +01:00
parent a35835e1f6
commit f44f56a5dc
3 changed files with 22 additions and 3 deletions

View File

@ -258,6 +258,11 @@ class PlayerActions implements EchoListener, CommunicationListener {
$this->maniaControl->getChat()->sendException($exception, $admin);
}
return false;
} catch (UnknownPlayerException $exception) {
if ($calledByAdmin) {
$this->maniaControl->getChat()->sendException($exception, $admin);
}
return false;
}
if ($userIsAbleToSelect) {
@ -555,6 +560,11 @@ class PlayerActions implements EchoListener, CommunicationListener {
$this->maniaControl->getChat()->sendException($e, $admin);
}
return false;
} catch (UnknownPlayerException $e) { //TODO check why it's actually needed, but there was a crash at this place
if ($calledByAdmin) {
$this->maniaControl->getChat()->sendException($e, $admin);
}
return false;
}
} else {
try {