validate dedimania resposne

This commit is contained in:
Steffen Schröder 2014-06-29 17:17:20 +02:00
parent 4ac0ec7f73
commit 8d5359bb82

View File

@ -279,6 +279,11 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
} }
$responseData = $methodResponse[0]; $responseData = $methodResponse[0];
if (!isset($responseData['Players']) || !isset($responseData['Records'])) {
$this->maniaControl->errorHandler->triggerDebugNotice('Invalid Dedimania response!', $responseData);
return;
}
$this->dedimaniaData->serverMaxRank = $responseData['ServerMaxRank']; $this->dedimaniaData->serverMaxRank = $responseData['ServerMaxRank'];
foreach ($responseData['Players'] as $player) { foreach ($responseData['Players'] as $player) {