diff --git a/application/core/Manialinks/ManialinkManager.php b/application/core/Manialinks/ManialinkManager.php index b7608888..ca6ea575 100644 --- a/application/core/Manialinks/ManialinkManager.php +++ b/application/core/Manialinks/ManialinkManager.php @@ -164,7 +164,12 @@ class ManialinkManager implements ManialinkPageAnswerListener, CallbackListener * @return bool */ public function enableAltMenu(Player $player) { - return $this->maniaControl->client->triggerModeScriptEvent('LibXmlRpc_EnableAltMenu', $player->login); + try { + $success = $this->maniaControl->client->triggerModeScriptEvent('LibXmlRpc_EnableAltMenu', $player->login); + } catch(\Exception $e) { + return false; + } + return $success; } /** @@ -174,7 +179,12 @@ class ManialinkManager implements ManialinkPageAnswerListener, CallbackListener * @return bool */ public function disableAltMenu(Player $player) { - return $this->maniaControl->client->triggerModeScriptEvent('LibXmlRpc_DisableAltMenu', $player->login); + try { + $success = $this->maniaControl->client->triggerModeScriptEvent('LibXmlRpc_DisableAltMenu', $player->login); + } catch(\Exception $e) { + return false; + } + return $success; } /** diff --git a/application/core/Server/RankingManager.php b/application/core/Server/RankingManager.php index 2244c267..efe8b485 100644 --- a/application/core/Server/RankingManager.php +++ b/application/core/Server/RankingManager.php @@ -43,7 +43,11 @@ class RankingManager implements CallbackListener { * Initialize the Rankings */ public function onInit() { - $this->maniaControl->client->triggerModeScriptEvent('LibXmlRpc_GetRankings', ''); + try { + $this->maniaControl->client->triggerModeScriptEvent('LibXmlRpc_GetRankings', ''); + } catch(\Exception $e) { + //do nothing + } }