From a32e7df5e0cfa98cd7ecc34ba697e815d1ffaa4b Mon Sep 17 00:00:00 2001 From: kremsy Date: Wed, 24 May 2017 10:05:28 +0200 Subject: [PATCH] updated exception --- core/Server/Server.php | 2 +- libs/Maniaplanet/DedicatedServer/Xmlrpc/FaultException.php | 1 + plugins/MCTeam/Dedimania/DedimaniaWebHandler.php | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/core/Server/Server.php b/core/Server/Server.php index 2d93998d..e500f9d8 100644 --- a/core/Server/Server.php +++ b/core/Server/Server.php @@ -332,7 +332,7 @@ class Server implements CallbackListener, CommandListener, UsageInformationAble $login = Player::parseLogin($login); try { $replay = $this->maniaControl->getClient()->getValidationReplay($login); - } catch (Exception $e) { + } catch (Exception $e) { //UnavailableFeature Exception $this->maniaControl->getErrorHandler()->triggerDebugNotice("Exception line 330 Server.php" . $e->getMessage()); Logger::logError("Couldn't get validation replay of '{$login}'. " . $e->getMessage()); return null; diff --git a/libs/Maniaplanet/DedicatedServer/Xmlrpc/FaultException.php b/libs/Maniaplanet/DedicatedServer/Xmlrpc/FaultException.php index 11a7901c..b4fbfdf1 100755 --- a/libs/Maniaplanet/DedicatedServer/Xmlrpc/FaultException.php +++ b/libs/Maniaplanet/DedicatedServer/Xmlrpc/FaultException.php @@ -23,6 +23,7 @@ class FaultException extends Exception { case 'No replay to save': case 'Internal error.': case 'Unable to retrieve validation data. ': + case 'No new replay.': return new UnavailableFeatureException($faultString, $faultCode); case 'You must enable the callbacks to be able to do chat routing.': case 'Chat routing not enabled.': diff --git a/plugins/MCTeam/Dedimania/DedimaniaWebHandler.php b/plugins/MCTeam/Dedimania/DedimaniaWebHandler.php index 22522c71..c049d425 100644 --- a/plugins/MCTeam/Dedimania/DedimaniaWebHandler.php +++ b/plugins/MCTeam/Dedimania/DedimaniaWebHandler.php @@ -54,6 +54,7 @@ class DedimaniaWebHandler implements TimerListener { if (!$data || $error) { Logger::logError("Dedimania Error while opening session: '{$error}' Line 42"); } + $data = $this->decode($data); if (!is_array($data) || empty($data)) {