php 5.3 compatibility changes

This commit is contained in:
Steffen Schröder
2014-04-15 11:33:06 +02:00
parent 2db2c88554
commit 81af68838b
2 changed files with 20 additions and 9 deletions

View File

@ -809,7 +809,8 @@ class Dedimania implements CallbackListener, TimerListener, Plugin {
*/
private function getGameModeString() {
$gameMode = $this->maniaControl->server->getGameMode();
$scriptName = str_replace('.Script.txt', '', $this->maniaControl->client->getScriptName()["CurrentValue"]);
$scriptNameResponse = $this->maniaControl->client->getScriptName();
$scriptName = str_replace('.Script.txt', '', $scriptNameResponse["CurrentValue"]);
if ($gameMode === null) {
trigger_error("Couldn't retrieve game mode. ");
return null;