From b6f5fc56864cf97899230fcd257a2daef7387597 Mon Sep 17 00:00:00 2001 From: kremsy Date: Thu, 13 Feb 2014 21:04:18 +0100 Subject: [PATCH] exception fix --- application/core/Maps/MapQueue.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/application/core/Maps/MapQueue.php b/application/core/Maps/MapQueue.php index e32e19d5..40b90285 100644 --- a/application/core/Maps/MapQueue.php +++ b/application/core/Maps/MapQueue.php @@ -9,7 +9,6 @@ use ManiaControl\Commands\CommandListener; use ManiaControl\Formatter; use ManiaControl\ManiaControl; use ManiaControl\Players\Player; -use Maniaplanet\DedicatedServer\InvalidArgumentException; /** * MapQueue Class @@ -176,17 +175,12 @@ class MapQueue implements CallbackListener, CommandListener { $this->nextMap = array_shift($this->queuedMaps); //Check if Map Queue is empty - if ($this->nextMap == null) { + if ($this->nextMap == null || !isset($this->nextMap[1])) { return; } $map = $this->nextMap[1]; - - try { - $this->maniaControl->client->chooseNextMap($map->fileName); - } catch(InvalidArgumentException $e) { - //do nothing - } + $this->maniaControl->client->chooseNextMap($map->fileName); } /**